FontDescriptor

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

This class provides 18 methods for working with FontDescriptor objects in Java programs. Available methods include: FontDescriptor, getAscent, getCapHeight, getDescent, getFlags, getFontBBox, getFontFile, getFontFile2, getFontFile3, getFontName, getItalicAngle, getMissingWidth, and 6 additional methods. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package. Properties: ascent, capHeight, descent, fixedPitch, flags, fontBBox, and 11 more.

Properties

NameTypeAccessDescription
fontNameStringReadReturns the PostScript font name (/FontName).
flagsintReadReturns the font flags bitmask (/Flags, §9.8.2, Table 123).
ascentdoubleReadReturns the ascent (/Ascent) — maximum height above baseline.
descentdoubleReadReturns the descent (/Descent) — maximum depth below baseline (usually negative).
capHeightdoubleReadReturns the cap height (/CapHeight) — height of capital letters.
italicAngledoubleReadReturns the italic angle (/ItalicAngle) in degrees counter-clockwise from vertical.
stemVdoubleReadReturns the dominant stem width (/StemV) for vertical stems.
fontBBoxRectangleReadReturns the font bounding box (/FontBBox [llx lly urx ury]).
missingWidthdoubleReadReturns the missing width (/MissingWidth) for characters not in the font’s /Widths.
fontFilePdfStreamReadReturns the /FontFile stream (Type 1 font program).
fontFile2PdfStreamReadReturns the /FontFile2 stream (TrueType font program).
fontFile3PdfStreamReadReturns the /FontFile3 stream (CFF/OpenType font program).
fixedPitchbooleanReadReturns true if the font is fixed-pitch (flag bit 1).
serifbooleanReadReturns true if the font is serif (flag bit 2).
symbolicbooleanReadReturns true if the font is symbolic (flag bit 3).
italicbooleanReadReturns true if the font is italic (flag bit 7).
pdfDictionaryPdfDictionaryReadReturns the underlying PDF dictionary.

Methods

SignatureDescription
FontDescriptor(dict: PdfDictionary)Creates a FontDescriptor from a /FontDescriptor dictionary.
getFontName()StringReturns the PostScript font name (/FontName).
getFlags()intReturns the font flags bitmask (/Flags, §9.8.2, Table 123).
getAscent()doubleReturns the ascent (/Ascent) — maximum height above baseline.
getDescent()doubleReturns the descent (/Descent) — maximum depth below baseline (usually negative).
getCapHeight()doubleReturns the cap height (/CapHeight) — height of capital letters.
getItalicAngle()doubleReturns the italic angle (/ItalicAngle) in degrees counter-clockwise from vertical.
getStemV()doubleReturns the dominant stem width (/StemV) for vertical stems.
getFontBBox()RectangleReturns the font bounding box (/FontBBox [llx lly urx ury]).
getMissingWidth()doubleReturns the missing width (/MissingWidth) for characters not in the font’s /Widths.
getFontFile()PdfStreamReturns the /FontFile stream (Type 1 font program).
getFontFile2()PdfStreamReturns the /FontFile2 stream (TrueType font program).
getFontFile3()PdfStreamReturns the /FontFile3 stream (CFF/OpenType font program).
isFixedPitch()booleanReturns true if the font is fixed-pitch (flag bit 1).
isSerif()booleanReturns true if the font is serif (flag bit 2).
isSymbolic()booleanReturns true if the font is symbolic (flag bit 3).
isItalic()booleanReturns true if the font is italic (flag bit 7).
getPdfDictionary()PdfDictionaryReturns the underlying PDF dictionary.

See Also

 English