In french: iPolice
Selects the default font. This font will be used by iPrint
- This font must have been created by iCreateFont.
- This font is active as long as iFont is not used again.
- Only TrueType fonts are managed.
: A specific configuration is required to use this function in Linux. For more details, see Print in Linux
iPrintWord(iFont(2) + CU.LastName + iXPos(200) + CU.Firstname)
iPrint(iFont(1) + iXPos(100) + CU.Company)
Using a dynamic font Hide the details
<Result> = iFont(<Font name> [, <Immediate calculation>])
<Result>: Character string
Control string describing the use of the specified font.
<Font name>: Font
Name of default font to use. This parameter corresponds to a Font variable. The font characteristics have been defined by FontCreate or via the properties for font management.
Only TrueType fonts are managed.
<Immediate calculation>: Optional boolean
Specifies whether the fonts must be selected immediately (True by default) or only when printing (False, if fonts must be combined, for example). For more details, see remarks.
Unexpected results may occur when combining fonts. For example, the following code:
iPrint("First Part" + iFont(1) + "Second Part")
is not equivalent to:
iPrint(iFont(2) + "First Part" + iFont(1) + "Second Part")
In the first case, the entire character string will be printed in font 1. Indeed, in this case, iFont(1) is run when building the string to print and therefore before the "First part" string is printed.
To get an identical result, all you have to do is use iFont with the False parameter (in the first syntax): iFont(2, False) will be actually run during the print.
This page is also available for…