Graphics.FontUnit
From Xojo Documentation
Property (As FontUnits )
aGraphics.FontUnit = newFontUnitsValue
or
FontUnitsValue = aGraphics.FontUnit
New in 2019r2
Supported for all project types and targets.
or
FontUnitsValue = aGraphics.FontUnit
New in 2019r2
Supported for all project types and targets.
The units in which FontSize is measured.
Notes
FontUnit and the FontUnits enumeration are not available for use in Console or Web apps. |
The FontUnits enumeration values are shown below:
Value |
---|
Default |
Pixel |
Point |
Inch |
Millimeter |
Sample Code
This example sets the units to points using the class constant.
g.DrawingColor = &cff0000
g.Italic = True
g.FontUnit = FontUnits.Point
g.FontSize = 16
g.DrawText("Hello world", 10, 10)
g.Italic = True
g.FontUnit = FontUnits.Point
g.FontSize = 16
g.DrawText("Hello world", 10, 10)