Type0Font
Overview
Type0Font is a class in Aspose.Pdf FOSS for Java.
Inherits from: PdfFont.
Type 0 (Composite) font (ISO 32000-1:2008, §9.7).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
composite | boolean | Read | |
descendantFont | CIDFont | Read | Returns the descendant CIDFont. |
fontDescriptor | FontDescriptor | Read | Returns the {@link FontDescriptor} carried by the descendant CIDFont |
| (the Type0 root itself doesn’t have one — PDF spec §9.7.3 places the | |||
| descriptor on the descendant). | |||
encodingName | String | Read | Returns the encoding name (e.g., “Identity-H”). |
baseFont | String | Read | Returns the base font name (/BaseFont). |
encoding | FontEncoding | Read | Returns the font encoding. |
toUnicode | ToUnicodeCMap | Read | Returns the ToUnicode CMap. |
fontMetrics | FontMetrics | Read | Returns the font metrics. |
fontDictionary | COSDictionary | Read | Returns the underlying font dictionary. |
Methods
| Signature | Description |
|---|---|
Type0Font(fontDict: COSDictionary, parser: PDFParser) | Creates a Type0Font from a font dictionary. |
decode(charCodes: byte[]) → String | Decodes raw bytes using two-level CID mapping. |
getWidth(charCode: int) → double | |
isComposite() → boolean | |
getDescendantFont() → CIDFont | Returns the descendant CIDFont. |
getFontDescriptor() → FontDescriptor | Returns the {@link FontDescriptor} carried by the descendant CIDFont |
| (the Type0 root itself doesn’t have one — PDF spec §9.7.3 places the | |
| descriptor on the descendant). | |
getEncodingName() → String | Returns the encoding name (e.g., “Identity-H”). |
getBaseFont() → String | Returns the base font name (/BaseFont). |
getEncoding() → FontEncoding | Returns the font encoding. |
getToUnicode() → ToUnicodeCMap | Returns the ToUnicode CMap. |
getFontMetrics() → FontMetrics | Returns the font metrics. |
getFontDictionary() → COSDictionary | Returns the underlying font dictionary. |
fromDictionary(fontDict: COSDictionary, parser: PDFParser) → PdfFont | Creates the appropriate PdfFont subclass from a font dictionary. |