Class Post
java.lang.Object
com.adobe.fontengine.font.opentype.Table
com.adobe.fontengine.font.opentype.Post
Gives access to the 'post' table.
Version handling
'post' tables have a major/minor version number. This implementation:
- fully supports version 1.0, 2.0, 2.5 and 3.0 tables,
- partially supports version 4.0 tables,
- interprets 1.x tables as 1.0 tables,
- interprets 2.x tables with x invalid input: '<' 5 as 2.0 tables
- interprets 2.x tables with x > 5 as 2.5 tables
- interprets 3.x tables as 3.0 tables
- interprets 4.x tables as 4.0 tables
- rejects other versions with an
UnsupportedFontExceptionat construction time.
Version 2.5 is treated as if it were a major version number (which it should have been, since a table with version 2.5 cannot be interpreted correctly by a 2.0 client).
When some data is not present in the actual version of the table, the accessors return identified values.
Synchronization
Like all tables, these objects are immutable.
-
Method Summary
Modifier and TypeMethodDescriptiongetGlyphName(int gid) Get the name of a glyph.intintGet the number of glyphs.intGet the major version of this table.intGet the minor version of this table.intGet the underline position.intGet the underline thickness.intglyphName2gid(String name) Get the index of a glyph given its name.booleanvoidvoidsubsetAndStream(Subset subset, SubsetSimpleTrueType ttSubset, Map tables) voidsubsetAndStreamForCFF(Map tables)
-
Method Details
-
getTableMajorVersion
Get the major version of this table.- Throws:
InvalidFontException
-
getTableMinorVersion
Get the minor version of this table.- Throws:
InvalidFontException
-
getItalicAngle
- Throws:
InvalidFontException
-
getUnderlinePosition
Get the underline position.- Throws:
InvalidFontException
-
getUnderlineThickness
Get the underline thickness.- Throws:
InvalidFontException
-
isFixedPitch
- Throws:
InvalidFontException
-
getNumberOfGlyphs
Get the number of glyphs.- Returns:
- -1 if the table does not have this data
- Throws:
InvalidFontException
-
getGlyphName
Get the name of a glyph.- Returns:
- null if this information is not present, the name of the glyph otherwise
-
glyphName2gid
Get the index of a glyph given its name.- Returns:
- 0 if there is no glyph with the name
- Throws:
InvalidFontException
-
subsetAndStreamForCFF
- Throws:
InvalidFontException
-
subsetAndStream
public void subsetAndStream(Subset subset, SubsetSimpleTrueType ttSubset, Map tables) throws UnsupportedFontException, InvalidFontException -
stream
-