ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Font functions
  • Differences FontCreate and iCreateFont
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Creates a font definition. This font can be used:
Example
// Create a font
MyFont is Font
MyFont = FontCreate("Arial", 12, iBold, LightYellow)
// Use this font in the "CustomerName" control
CustomerName.Font = MyFont
WINDEVWEBDEV - Server codeReports and QueriesWindowsUser code (UMC)Ajax
// Create a standard font
StandardF is Font = FontCreate("Arial", 12)
// Create a bold font
BoldF is Font = FontCreate("Arial", 12, iBold)
// Prepare the print
iDestination(iPDF)
// Browse an array
i is int
FOR i = 1 TO 100
// Use the standard font for the first 50 array elements
IF i<=50 THEN
iFont(StandardF)
ELSE
// Use the bold font for the last 50 array elements
iFont(BoldF)
END
END
// Start the print job
iEndPrinting()
Syntax
<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:
iBoldBold font
iCondensedCondensed characters
iExtendedExtended characters
iItalicItalic font
iLargeLarge characters
iNormal
(default value)
Standard font, without attributes
iStrikeOutStrikethrough font
iUnderlinedUnderlined font
<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 a horizontal line (trigonometric direction).
Remarks

Differences FontCreate and iCreateFont

FontCreate creates a font definition that can be used in all the elements of a WINDEV or WEBDEV application. This font is stored in the Font variable and can be used:
iCreateFont creates 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: wd290vm.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help