Font Class |
public class Font : NativeObject
The Font type exposes the following members.
| Name | Description | |
|---|---|---|
| Ascent | The ascent of the font. The maximum height above the baseline reached by glyphs in this font, excluding the height of glyphs for accented characters. | |
| BaseFont | The PostScript name of the font | |
| CapHeight | The cap height of the font. The vertical coordinate of the top of flat capital letters, measured from the baseline. | |
| Descent | The descent of the font. The maximum depth below the baseline reached by glyphs in this font. The value is a negative number. | |
| DescriptorFlags | The flags of the font descriptor. The unmodified value of the /Flags entry of the font descriptor, as defined in ISO 32000. If the font has no font descriptor or the font descriptor has no /Flags entry, is returned. | |
| HasUnicodes | Specifies whether the font provides a mapping to Unicode. If , text written with this font cannot be reliably extracted. The mapping is taken from the font's ToUnicode map or its encoding. For composite fonts and symbolic TrueType fonts without either, an installed font with the same name is used if available, so the result can depend on the fonts installed on the system. | |
| IsEmbedded | Specifies whether the font is embedded. | |
| ItalicAngle | The italic angle of the font. The angle is expressed in degrees counterclockwise from the vertical, of the dominant vertical strokes of the font. (For example, the 9-o’clock position is 90 degrees, and the 3-o’clock position is –90 degrees.) The value is negative for fonts that slope to the right, as almost all italic fonts do. | |
| Leading | The leading of the font. The vertical distance between two adjacent base lines in multiline text. This is a recomended value when generating several lines of text. If the font does not define this value, is returned. Note that TextGenerator(Text, Font, Double, NullablePoint) uses a fixed value of 1.2 instead of this property to initialize the Leading in order to maintain backward compatibility with earlier versions. | |
| RawBaseFont | The unmodified PostScript name of the font In contrast to BaseFont, the subset prefix (e.g. "ABCDEF+") is retained. For composite fonts, the name of the descendant font is returned. If the font has no /BaseFont entry, its /Name entry is returned, or "Unknown" if that is missing too. | |
| Weight | The visual weight of the font. Indicates the visual weight (degree of blackness or thickness of strokes) of the characters in the font. If the font does not define this value, is returned. |
| Name | Description | |
|---|---|---|
| Create | Create a new font object from font file data. Supported formats are:
| |
| CreateFromSystem | Create a new font object from an installed font. The returned font object is not yet used on any page, but it is associated with the given target document. | |
| Equals | (Inherited from NativeObject) | |
| GetCharacterWidth | the width of a single glyph. The width of a unicode character (in pt) relative to a font size of 1 pt. If an error occurs (because the font or the owning document has already been closed) this method returns 0. But a return value of 0 is not generally an indication for failure. | |
| GetGlyphName | the glyph name of a character code. Only simple fonts map character codes to glyph names. For composite (CID) fonts or unmapped character codes, is returned. | |
| GetHashCode | (Inherited from NativeObject) |