TrueTypeReader

TrueTypeReader

Overview

TrueTypeReader is a class in Aspose.Pdf FOSS for Java.

Reads TrueType/OpenType font files (sfnt format).

Properties

NameTypeAccessDescription
unitsPerEmintReadReturns the font’s unitsPerEm value from the head table.
numGlyphsintReadReturns the number of glyphs in the font.
fontNameStringReadReturns the font name from the name table (if available).
cmapEntriesjava.util.Map<Integer, Integer>ReadReturns an unmodifiable view of the Unicode-to-glyph cmap as a map.

Methods

SignatureDescription
TrueTypeReader(data: byte[])Creates a TrueTypeReader from raw font data.
getUnitsPerEm()intReturns the font’s unitsPerEm value from the head table.
getNumGlyphs()intReturns the number of glyphs in the font.
getGlyphId(charCode: int)intMaps a character code to a glyph ID using the cmap table.
getUnicodeForGlyphId(glyphId: int)intReturns the first Unicode code point mapped to the given glyph ID.
getGlyphName(glyphId: int)StringReturns the PostScript name for the glyph from the {@code /post} table,
or {@code null} if the post table was missing, used a format we don’t
parse, or the glyph id is out of range.
getAdvanceWidth(glyphId: int)intReturns the advance width for the given glyph ID, in font units.
getFontName()StringReturns the font name from the name table (if available).
getCmapEntries()java.util.Map<Integer, Integer>Returns an unmodifiable view of the Unicode-to-glyph cmap as a map.

See Also