PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Example 1: Printing a text in a specific font
  • Example 2: Printing a text while using several preset fonts
iCreateFont (Example)
Example 1: Printing a text in a specific font
Windows Mobile The following example is used to print a text in a specific font.
// Creates a 48-point Pica font
iCreateFont(1, 48, iBold+iItalic, iRoman)
// Prints a text with this font
iPrint(iFont(1) + "48-pica text")
// Ends the print
iEndPrinting()
Example 2: Printing a text while using several preset fonts
Windows Mobile The following example is used to print a text by using 3 different fonts.
// Create several fonts
iCreateFont(1, 12, iNormal, "Times New Roman")
iCreateFont(2, 24, iNormal+iBold, iCourier)
iCreateFont(3, 36, iItalic+iBold, iCourier)
// Prints a text with several fonts
iPrint(iXPos(10) + iFont(1) + "Text at 10 mm from the border" + ...
iXPos(70) + iFont(2) + "Text at 70 mm from the border" + ...
iXPos(150) + iFont(3) + "Text at 150 mm from the border")
// Ends the print
iEndPrinting()
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment