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).

This class provides 14 methods for working with Type0Font objects in Java programs. Available methods include: Type0Font, decode, fromDictionary, getBaseFont, getDescendantFont, getEncoding, getEncodingName, getFontDescriptor, getFontDictionary, getFontMetrics, getToUnicode, getWidth, and 2 additional methods. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package. Properties: baseFont, composite, descendantFont, encoding, encodingName, fontDescriptor, and 4 more.

Properties

NameTypeAccessDescription
compositebooleanReadGets the composite.
descendantFontCIDFontReadReturns the descendant CIDFont.
fontDescriptorFontDescriptorReadReturns 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).
encodingNameStringReadReturns the encoding name (e.g., “Identity-H”).
identityEncodingbooleanReadReturns true when the encoding CMap is Identity-H or Identity-V,
i.e.
baseFontStringReadReturns the base font name (/BaseFont).
encodingFontEncodingReadReturns the font encoding.
toUnicodeToUnicodeCMapReadReturns the ToUnicode CMap.
fontMetricsFontMetricsReadReturns the font metrics.
fontDictionaryPdfDictionaryReadReturns the underlying font dictionary.

Methods

SignatureDescription
Type0Font(fontDict: PdfDictionary, parser: PDFParser)Creates a Type0Font from a font dictionary.
decode(charCodes: byte[]) → StringDecodes raw bytes using two-level CID mapping.
getWidth(charCode: int) → double
isComposite() → booleanReturns true if composite is set.
getDescendantFont() → CIDFontReturns the descendant CIDFont.
getFontDescriptor() → FontDescriptorReturns 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() → StringReturns the encoding name (e.g., “Identity-H”).
isIdentityEncoding() → booleanReturns true when the encoding CMap is Identity-H or Identity-V,
i.e.
getBaseFont() → StringReturns the base font name (/BaseFont).
getEncoding() → FontEncodingReturns the font encoding.
getToUnicode() → ToUnicodeCMapReturns the ToUnicode CMap.
getFontMetrics() → FontMetricsReturns the font metrics.
getFontDictionary() → PdfDictionaryReturns the underlying font dictionary.
fromDictionary(fontDict: PdfDictionary, parser: PDFParser) → PdfFontCreates the appropriate PdfFont subclass from a font dictionary.

See Also

 English