Property

Graphics.TextUnit


Warning

This item was deprecated in version 2019r2. Please use Graphics.FontUnit as a replacement.

Description

The units in which TextSize is measured.

Notes

Note

TextUnit 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.ForeColor = &cff0000
g.Italic = True
g.TextUnit = FontUnits.Point
g.TextSize = 16
g.DrawString("Hello world", 10, 10)

Compatibility

All project types on all supported operating systems.

See also

Graphics parent class; FontUnits Enumeration