ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Print functions
  • Combining fonts
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Selects the default font. This font will be used by iPrint, iPrintWord, iTextWidth, iTextHeight, etc.
Remarks:
  • This font must have been created by iCreateFont.
  • This font is active as long as iFont is not used again.
  • Linux Only TrueType fonts are managed.
Linux Caution: Using this function under Linux requires a specific configuration.. For more details, see Print in Linux.
Example
iPrintWord(iFont(2) + CU.LastName + iXPos(200) + CU.Firstname)
iSkipLine
iPrint(iFont(1) + iXPos(100) + CU.Company)
iEndPrinting
Syntax

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 with FontCreate or via the font properties.
Linux 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.
WINDEVWEBDEV - Server codeReports and QueriesAndroidAndroid Widget iPhone/iPadJavaUser code (UMC)Ajax

Using a font created by iCreateFont (5.5-compatible syntax) Hide the details

<Result> = iFont(<Font number> [, <Immediate calculation>])
<Result>: Character string
Control string describing the use of the specified font.
<Font number>: Integer
Identifier of font used by default. This identifier was specified when the font was created by iCreateFont.
Linux 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.
Remarks
WINDEVWEBDEV - Server codeReports and QueriesAndroidAndroid Widget iPhone/iPadJavaUser code (UMC)Ajax

Combining fonts

Unexpected results may occur when combining fonts. For example, the following code:
iFont(2)
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. In this case, function iFont(1) is executed when the string to be printed is constructed, and therefore before the "First part" string is printed.
To obtain the same result, simply use (in the first syntax) function iFont with parameter Faux: function iFont(2, False) will only be actually executed during printing.
Component: wd300prn.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/30/2024

Send a report | Local help