Graphics.FontUnit

From Xojo Documentation

Revision as of 15:19, 4 February 2020 by PLefebvre (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Property (As FontUnits )
aGraphics.FontUnit = newFontUnitsValue
or
FontUnitsValue = aGraphics.FontUnit

New in 2019r2

Supported on Desktop projects.

The units in which FontSize is measured.

Notes

fa-info-circle-32.png
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)

See Also

FontUnits Enumeration