PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Differences between FontCreate and iCreateFont
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
Creates a font definition. This font can be used:
Versions 17 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
iPhone/iPad This function is now available for the iPhone/iPad applications.
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 QueriesWindowsAjaxUser code (UMC)
// 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
iEndPrinting()
Syntax
<Result> = FontCreate(<Font Name> [, <Size> [, <Style> [, <Color> [, <Angle>]]]])
<Result>: Font variable
Name of the Font variable that can be used in the different drawing functions, chart functions or print functions that use a font.
<Font Name>: Character string (with quotes)
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:
iNormal
(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 corresponds 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).
Remarks

Differences between FontCreate and iCreateFont

FontCreate creates a font definition that can be used in all the elements found in a WINDEV or WEBDEV application. This font is stored by the Font variable type and it 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 controls of a window (..Font property for the window controls)
  • to define the font used in the controls of a page (..Font property for the page controls)
  • to define the font used in the controls of a report (..Font property for the report controls)
iCreateFont can only be used to create a font that can be used by the print 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.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230vm.dll
Windows Mobile wp230vm.dll
Linux wd230vm.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment