The Font object provides control over font data., e.g. capital height, descender depth etc.
This information was (partially) available inside the markup language via the variables CapH, DesD etc.. and now also from scripting, where it can be handy to compute dimensions based on font characteristics.
The Font object is available in Ted and in Fred, during page editing and text editing.
Properties
Basics
Code Property | Returns the font code number. |
Name Property | Returns the font name. |
Description Property | Returns the font's description. |
Family Property | Returns the font family name. |
PFB Property | Returns the font's PFB file name. |
LayoutId Property | Returns the layout id of the given font. |
Style
IsBold Property | Returns the font's bold status. |
IsItalic Property | Returns the font's italic status. |
Metrics - fixed spaces
EMWidth Property | Returns the font's EM width. |
ENWidth Property | Returns the font's EN width. |
ThinWidth Property | Returns the font's Thin width. |
Slant Property | Returns the font's slant. |
Metrics - heights, depths and positions
CapHeight Property | Returns the font's capital height. |
XHeight Property | Returns the font's X height. |
DesDepth Property | Returns the font's descenders depth. |
AxisHeight Property | Returns the font's axis height. |
Metrics - small caps
SmallCapsWidth Property | Returns the width of the small capitals in the given font. |
SmallCapsHeight Property | Returns the height of the small capitals in the given font. |
Metrics - kerning
NKernPairs Property | Returns the number of kerning pairs in the current font. |
KernPair Property | Returns the selected kern pair. |
KernValue Property | Returns the selected kern value. |
Metrics - character data
CharWidth Property | Returns the width for the specified character in the current font. |
CharHeight Property | Returns the height for the specified character in the current font. |
CharDepth Property | Returns the depth for the specified character in the current font. |
To create font object
Dim objFont = Ted.GetFont
Dim objFont = Fred.GetFont
See also