PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Default font
  • Font and family
  • Finding out the list of fonts installed on a computer
  • Differences between FontCreate and iCreateFont
  • Various
  • Freeing the fonts created by 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 new print font. This font can be used in the different processes. This font is referenced by a font number, chosen during the development. To choose this font and to use it in the different print functions, all you have to do is select it with iFont.
Note: This function MUST NECESSARILY be called AFTER iPreview. Otherwise, the previews will be ignored.
Windows Mobile Caution: You can only print by using the printer fonts. If the font used is not available, the closest font will be used. See Characteristics of a print on Mobile Device (Pocket PC) for more details.
Versions 18 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 18
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 19 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
New in version 19
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
// Creates a 48-point Pica font
iCreateFont(1, 48, iBold + iItalic, iRoman)
// Prints a text with this font
iPrint(iFont(1) + "48-pica text")
Syntax

Creating a new font Hide the details

iCreateFont(<Identifier> , <Size> , <Style> , <Name> [, <Color> [, <Angle>]])
<Identifier>: Integer
Font identifier. This identifier will be used in the different print functions to specify the font used.
<Size>: Integer
Height of font in Pica points (1 Pica point = 0.353 mm).
<Style>: Integer constant (or combination of constants)
Font attributes.
iStrikeOutStrikeout font
iCondensedCondensed characters
AndroidAndroid Widget Universal Windows 10 AppJava This option is ignored.
iExtendedExtended characters
AndroidAndroid Widget Universal Windows 10 AppJava This option is ignored.
iBoldBold font
iItalicItalic font
iLargeLarge characters
AndroidAndroid Widget Universal Windows 10 AppJava This option is ignored.
iNormal
(default value)
Standard font, without attributes
iUnderlinedUnderlined font
Java The font angle will be ignored if the iStrikeOut or iUnderlined constant is specified.
<Name>: Character string (with quotes)
Name of font (among the fonts installed on the current computer).
AndroidAndroid Widget Java Printing in PDF: only the following fonts are supported: Courier, Helvetica, Times, Symbol and ZapfDingbats. If the name of specified font does not correspond to a supported font, the Helvetica font will be used.
<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).
Windows Mobile This parameter is not available in this version. This parameter will be ignored if it is specified.
Java The font angle will be ignored if the iStrikeOut or iUnderlined constant is specified.
WINDEVWEBDEV - Server codeWINDEV MobileReports and QueriesAjaxUser code (UMC)

Creating a font family Hide the details

iCreateFont(<Identifier> , <Size> , <Style> , <Family> [, <Color> [, <Angle>]])
<Identifier>: Integer
Font identifier. This identifier will be used in the different print functions to specify the font used.
<Size>: Integer
Height of font in Pica points (1 Pica point = 0.353 mm).
<Style>: Integer constant (or combination of constants)
Font attributes.
iStrikeOutStrikeout font
iCondensedCondensed characters
iExtendedExtended characters
iBoldBold font
iItalicItalic font
iLargeLarge characters
iNormal
(default value)
Standard font, without attributes
iUnderlinedUnderlined font
<Family>: Integer constant
Font family.
iCourierCourier font (fixed character width)
iDefaultAny font ("Don't care")
iRomanRoman font (exotic font)
iSwissSwiss font (quality font)
<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).
Windows Mobile This parameter is not available in this version. This parameter will be ignored if it is specified.
Remarks

Default font

If iCreateFont is not used, the default font will have the following characteristics:
  • Font #0,
  • size: 12,
  • normal style.
WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadWindows MobileAjaxUser code (UMC)

Font and family

With some configurations, iPrint can produce unexpected results if the name of a font family was specified in iCreateFont. We recommend that you specify the name of a font in iCreateFont.

Finding out the list of fonts installed on a computer

To find out the list of fonts installed on a computer:
  1. In the program manager of Windows, select the main group.
  2. Click the "Control panel" icon and select "Fonts".
  3. In the list of fonts installed, write down the names without taking the attributes and the types into account.
Notes:
  • WINDEVWEBDEV - Server code FontList returns the list of fonts installed on a computer.
  • WINDEV iSelectFont is used to create a print font from the standard window for font selection of Windows
WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadWindows MobileAjaxUser code (UMC)

Differences between FontCreate and iCreateFont

FontCreate is used to create a font definition that can be used in all the elements of a WINDEV or WEBDEV application. This font is stored by the Font variable and it can be used:
iCreateFont can only be used to create a font usable by the print functions.

Various

  • iCreateFont can be used to create as many fonts as necessary (the only limit is the available memory).
  • You must create as many fonts as the number of colors found in the text.
  • When printing in an HTML or RTF file (iPreview or iDestination), the fonts oriented to 90° are replaced by a font oriented to 0°: the text is printed horizontally.

Freeing the fonts created by iCreateFont

The fonts created by iCreateFont can be freed by iReset when they are no longer used in order to free the occupied resources. If iReset is not used, the fonts will be automatically freed when closing the application.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230prn.dll
Windows Mobile wp230prn.dll
Java wd230java.jar
Linux wd230prn.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment