FontDescriptor
Overview
FontDescriptor is a class in Aspose.Pdf FOSS for Java.
Wraps a PDF /FontDescriptor dictionary (ISO 32000-1:2008, §9.8, Table 122).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
fontName | String | Read | Returns the PostScript font name (/FontName). |
flags | int | Read | Returns the font flags bitmask (/Flags, §9.8.2, Table 123). |
ascent | double | Read | Returns the ascent (/Ascent) — maximum height above baseline. |
descent | double | Read | Returns the descent (/Descent) — maximum depth below baseline (usually negative). |
capHeight | double | Read | Returns the cap height (/CapHeight) — height of capital letters. |
italicAngle | double | Read | Returns the italic angle (/ItalicAngle) in degrees counter-clockwise from vertical. |
stemV | double | Read | Returns the dominant stem width (/StemV) for vertical stems. |
fontBBox | Rectangle | Read | Returns the font bounding box (/FontBBox [llx lly urx ury]). |
missingWidth | double | Read | Returns the missing width (/MissingWidth) for characters not in the font’s /Widths. |
fontFile | COSStream | Read | Returns the /FontFile stream (Type 1 font program). |
fontFile2 | COSStream | Read | Returns the /FontFile2 stream (TrueType font program). |
fontFile3 | COSStream | Read | Returns the /FontFile3 stream (CFF/OpenType font program). |
fixedPitch | boolean | Read | Returns true if the font is fixed-pitch (flag bit 1). |
serif | boolean | Read | Returns true if the font is serif (flag bit 2). |
symbolic | boolean | Read | Returns true if the font is symbolic (flag bit 3). |
italic | boolean | Read | Returns true if the font is italic (flag bit 7). |
cOSDictionary | COSDictionary | Read | Returns the underlying COS dictionary. |
Methods
| Signature | Description |
|---|---|
FontDescriptor(dict: COSDictionary) | Creates a FontDescriptor from a /FontDescriptor dictionary. |
getFontName() → String | Returns the PostScript font name (/FontName). |
getFlags() → int | Returns the font flags bitmask (/Flags, §9.8.2, Table 123). |
getAscent() → double | Returns the ascent (/Ascent) — maximum height above baseline. |
getDescent() → double | Returns the descent (/Descent) — maximum depth below baseline (usually negative). |
getCapHeight() → double | Returns the cap height (/CapHeight) — height of capital letters. |
getItalicAngle() → double | Returns the italic angle (/ItalicAngle) in degrees counter-clockwise from vertical. |
getStemV() → double | Returns the dominant stem width (/StemV) for vertical stems. |
getFontBBox() → Rectangle | Returns the font bounding box (/FontBBox [llx lly urx ury]). |
getMissingWidth() → double | Returns the missing width (/MissingWidth) for characters not in the font’s /Widths. |
getFontFile() → COSStream | Returns the /FontFile stream (Type 1 font program). |
getFontFile2() → COSStream | Returns the /FontFile2 stream (TrueType font program). |
getFontFile3() → COSStream | Returns the /FontFile3 stream (CFF/OpenType font program). |
isFixedPitch() → boolean | Returns true if the font is fixed-pitch (flag bit 1). |
isSerif() → boolean | Returns true if the font is serif (flag bit 2). |
isSymbolic() → boolean | Returns true if the font is symbolic (flag bit 3). |
isItalic() → boolean | Returns true if the font is italic (flag bit 7). |
getCOSDictionary() → COSDictionary | Returns the underlying COS dictionary. |