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.
Example
iPrintWord(iFont(2) + CL.Nom + iXPos(200) + CL.Prénom)
iSkipLine
iPrint(iFont(1) + iXPos(100) + CL.Société)
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.
<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.
AndroidAndroid Widget iPhone/iPad

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.
<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
AndroidAndroid Widget iPhone/iPad

Combining fonts

Unexpected results may occur when combining fonts. For example, the following code:
iFont(2)
iPrint("Première partie" + iFont(1) + "Seconde partie")
is not equivalent to:
iPrint(iFont(2) + "Première partie" + iFont(1) + "Seconde partie")
In the first case, the entire character string will be printed in font 1. In this case, the function iFont(1) function 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) the function iFont with the parameter False parameter: the function iFont(2, False) function will only be 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: 03/28/2025

Send a report | Local help