PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Characteristics of a font
  • Properties for managing fonts
  • Functions that use the Font variables
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
Font (Type of variable)
In french: Police (Type de variable)
A Font variable is used to create a font by programming. The characteristics of this font can be modified by several WLanguage properties.
A Font variable can be used:
  • in the drawings,
  • in the charts,
  • for the prints,
  • in the controls of a window (..Font property of the window controls),
  • in the controls of a page (..Font property for the page controls),
  • in the controls of a report (..Font property for the report controls).
Notes:
Versions 17 and later
iPhone/iPad This type of variable is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This type of variable is now available for iPhone/iPad applications.
iPhone/iPad This type of variable is now available for iPhone/iPad applications.
Versions 21 and later
Apple Watch This type of variable is now available in Apple Watch mode.
New in version 21
Apple Watch This type of variable is now available in Apple Watch mode.
Apple Watch This type of variable is now available in Apple Watch mode.
Versions 22 and later
Universal Windows 10 App This type of variable is now available in Universal Windows 10 App mode.
New in version 22
Universal Windows 10 App This type of variable is now available in Universal Windows 10 App mode.
Universal Windows 10 App This type of variable is now available in Universal Windows 10 App mode.
Example
// Declare the Font variables
MyFont is Font
MyFont1, MyFont2 are Font
// Variable initialized with the font created by FontCreate
MyFont = FontCreate("Arial", 12, iBold)
// Modify the characteristics of the font
MyFont..Name = "Arial"
MyFont..Size = 12
MyFont..Bold = True
// Use a font on a window control
EDT_Name..Font = MyFont

// Retrieve the font of a control
MyFont1 = EDT_FirstName..Font
Remarks

Characteristics of a font

By default, a Font variable has the following characteristics:
  • "Arial",
  • size 12,
  • black,
  • no attribute.
To define the characteristics of a font by programming, use:
  • FontCreate.
  • The properties for font management (see below)
  • FontSelect that opens the standard Windows window for font selection.

Properties for managing fonts

The following properties can be used to handle a Font variable:
Property nameEffect
CharsetReturns and modifies the character set used by a Font variable.
OrientationReturns and modifies the angle (in degrees) of a Font variable.
StrikeOutChecks whether a Font variable is struck out and strikes out (or not) a Font variable.
CondensedChecks whether a Font variable is condensed and condenses (or not) a Font variable.
ColorReturns and modifies the color of a Font variable.
ExtendedChecks whether a Font variable is extended and extends (or not) a Font variable.
BoldChecks whether a Font variable is bold and modifies the bold attribute of a Font variable.
ItalicChecks whether a Font variable is italic and modifies the italic attribute of a Font variable.
LargeChecks whether a Font variable is enlarged and enlarges (or not) a Font variable.
NameReturns and modifies the name of a Font variable.
UnderlineChecks whether a Font variable is underlined and underlines (or not) a Font variable.
SizeReturns and modifies the size (in picas) of a Font variable.
These properties can be directly used on the Font variable. Example:
MyFont is Font
MyFont..Bold = True
MyFont..Color = LightRed
Universal Windows 10 App Only the following properties can be used with the Font type: ..Orientation, ..StrikeOut, ..Color, ..Bold, ..Italic, ..Name, ..Underline, ..Size.

Functions that use the Font variables

The following functions can be used to handle a Font variable:
Versions 09 and later
dFont
New in version 09
dFont
dFont
Declares the font that will be used by dText:
  • in an Image control,
  • in an Image variable.
Versions 09 and later
FontCreate
New in version 09
FontCreate
FontCreate
Creates a font definition.
Versions 09 and later
FontSelect
New in version 09
FontSelect
FontSelect
Opens the standard window for font selection and selects the specified font.
Versions 09 and later
grLabelFont
New in version 09
grLabelFont
grLabelFont
Modifies the font used for the category labels of a chart.
Versions 09 and later
grLegendFont
New in version 09
grLegendFont
grLegendFont
Modifies the font used for the chart legend.
Versions 09 and later
grTitleFont
New in version 09
grTitleFont
grTitleFont
Modifies the font used for the chart title.
Versions 09 and later
iFont
New in version 09
iFont
iFont
Selects the default font.
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment