Type1Font

Overview

Type1Font is a class in Aspose.PDF FOSS for Java. Inherits from: PdfFont.

Simple Type 1 font (/Subtype /Type1) — ISO 32000-1:2008, §9.6.

This class provides 11 methods for working with Type1Font objects in Java programs. Available methods include: Type1Font, decode, fromDictionary, getBaseFont, getEncoding, getFontDescriptor, getFontDictionary, getFontMetrics, getToUnicode, getWidth, isComposite. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package. Properties: baseFont, composite, encoding, fontDescriptor, fontDictionary, fontMetrics, and 1 more.

Properties

NameTypeAccessDescription
baseFontStringReadReturns the base font name (/BaseFont).
encodingFontEncodingReadReturns the font encoding.
toUnicodeToUnicodeCMapReadReturns the ToUnicode CMap.
fontDescriptorFontDescriptorReadReturns the font descriptor.
compositebooleanReadReturns {@code true} when this is a Type0 composite font whose
content-stream encoding uses multi-byte character codes (e.g.
fontMetricsFontMetricsReadReturns the font metrics.
fontDictionaryPdfDictionaryReadReturns the underlying font dictionary.

Methods

SignatureDescription
Type1Font(fontDict: PdfDictionary, parser: PDFParser)Creates a Type1Font from a font dictionary.
decode(charCodes: byte[]) → String
getWidth(charCode: int) → double
getBaseFont() → StringReturns the base font name (/BaseFont).
getEncoding() → FontEncodingReturns the font encoding.
getToUnicode() → ToUnicodeCMapReturns the ToUnicode CMap.
getFontDescriptor() → FontDescriptorReturns the font descriptor.
isComposite() → booleanReturns {@code true} when this is a Type0 composite font whose
content-stream encoding uses multi-byte character codes (e.g.
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