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

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.
fontFileCOSStreamReadReturns the /FontFile stream (Type 1 font program).
fontFile2COSStreamReadReturns the /FontFile2 stream (TrueType font program).
fontFile3COSStreamReadReturns 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).
cOSDictionaryCOSDictionaryReadReturns the underlying COS dictionary.

Methods

SignatureDescription
FontDescriptor(dict: COSDictionary)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()COSStreamReturns the /FontFile stream (Type 1 font program).
getFontFile2()COSStreamReturns the /FontFile2 stream (TrueType font program).
getFontFile3()COSStreamReturns 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).
getCOSDictionary()COSDictionaryReturns the underlying COS dictionary.

See Also