PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Combining fonts
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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) + 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 by FontCreate or via the properties for font management.
<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). See remarks for more details.
Reports and Queries

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). See remarks for more details.
Remarks
Reports and Queries

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. 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.
Component : wd250prn.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment