PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Characteristics of a font
  • Font management properties
  • Functions that use the Font variables
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
Font (Type of variable)
In french: Police
A Font variable is used to create a font through programming. The characteristics of this font can be defined and modified using different 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 controls of a window),
  • in the controls of a page (.Font property for the page controls),
  • in the controls of a report (.Font property).
Remarks:
  • For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
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_LastName.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 through programming, use:
  • FontCreate.
  • The properties for font management (see below)
  • FontSelect that opens the standard Windows window for font selection.

Font management properties

The following properties can be used to handle a Font variable:
Property nameEffect
CharsetReturns and changes the character set used by a Font variable.
OrientationReturns and changes the angle (in degrees) of a Font variable.
StrikeOutChecks whether a Font variable is struck through and strikes through a Font variable.
CondensedChecks whether a Font variable is condensed and condenses a Font variable.
ColorChecks and changes the color of a Font variable.
ExtendedChecks whether a Font variable is expanded and expands a Font variable.
BoldChecks whether a Font variable is bold and changes the bold attribute of a Font variable.
ItalicChecks whether a Font variable is italicized and changes the italic attribute of a Font variable.
LargeChecks whether a Font variable is ultra-expanded and expands a Font variable.
NameReturns and changes the name of a Font variable.
UnderlineChecks whether a Font variable is underlined and underlines a Font variable.
SizeReturns and changes 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

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,
  • in a WDPic variable (on the background layer),
  • in a picLayer 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