Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Differences between the FontCreate function and the iCreatePolice function
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Creates a font definition. This font can be used:
// Création d'une police
MaPolice is Font
MaPolice = FontCreate("Arial", 12, iBold, LightYellow)
// Utilisation de cette police dans le champ "NomClient"
NomClient.Police = MaPolice
Reports and QueriesWindows
// Création d'une police normale
PNormal is Font = FontCreate("Arial", 12)
// Création d'une police en gras
PGras is Font = FontCreate("Arial", 12, iBold)
// Préparation de l'impression
// Parcours d'un tableau
i is int
FOR i = 1 TO 100
// Utilisation de la police normale pour les 50 premiers éléments du tableau
IF i<=50 THEN
// Utilisation de la police en gras pour les 50 derniers éléments du tableau
// Lancement de l'impression
<Result> = FontCreate(<Font name> [, <Size> [, <Style> [, <Color> [, <Angle>]]]])
<Result>: Font variable
Font variable that can be used in the different drawing functions, chart functions or print functions that use a font.
<Font name>: Character string
Name of font used. This name must correspond to one of the fonts installed on the current computer.
<Size>: Optional integer
Size of font expressed in picas (1 Pica = 0.353 mm). The font size is set to 12 by default.
<Style>: Optional Integer constant (or combination of constants)
Font attributes:
(default value)
Standard font, without attributes
iBoldBold font
iUnderlinedUnderlined font
iItalicItalic font
iStrikeOutStrikeout font
iCondensedCondensed characters
iExtendedExtended characters
iLargeLarge characters
<Color>: Optional integer
Color used for the font. If this parameter is not specified, the color used is black.
This color can correspond to:
<Angle>: Optional integer
Angle (in degrees) according to which the text will be printed. The angle is calculated counterclockwise from an horizontal line (trigonometric direction).

Differences between the FontCreate function and the iCreatePolice function

The FontCreate function allows you to create a font Definition usable in all elements of a WINDEV or WEBDEV application. This font is stored in the Font variable type and can be used:
  • to write text in drawings (dFont).
  • to select the font used in charts (grLabelFont, grLegendFont, grTitleFont, grAxisTitleFont).
  • to select a print font (iFont).
  • to define the font used in the fields of a window (property Font of the fields of a window).
  • to define the font used in the controls of a page (Font property for the page controls).
  • to define the font used in the fields of an report (property Font of the fields of an report).
The iCreateFont function can only be used to create a font that can be used by the printing functions.
Related Examples:
Font property Unit examples (WEBDEV): Font property
[ + ] This example presents the use of the..Font properties and the use of the FontCreate function.
Component: wd270vm.dll
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment