Class Post
- java.lang.Object
-
- com.adobe.fontengine.font.opentype.Table
-
- com.adobe.fontengine.font.opentype.Post
-
public final class Post extends Table
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 < 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
UnsupportedFontException
at 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getGlyphName(int gid)
Get the name of a glyph.int
getItalicAngle()
int
getNumberOfGlyphs()
Get the number of glyphs.int
getTableMajorVersion()
Get the major version of this table.int
getTableMinorVersion()
Get the minor version of this table.int
getUnderlinePosition()
Get the underline position.int
getUnderlineThickness()
Get the underline thickness.int
glyphName2gid(String name)
Get the index of a glyph given its name.boolean
isFixedPitch()
void
stream(Map tables)
void
subsetAndStream(Subset subset, SubsetSimpleTrueType ttSubset, Map tables)
void
subsetAndStreamForCFF(Map tables)
-
-
-
Method Detail
-
getTableMajorVersion
public int getTableMajorVersion() throws InvalidFontException
Get the major version of this table.- Throws:
InvalidFontException
-
getTableMinorVersion
public int getTableMinorVersion() throws InvalidFontException
Get the minor version of this table.- Throws:
InvalidFontException
-
getItalicAngle
public int getItalicAngle() throws InvalidFontException
- Throws:
InvalidFontException
-
getUnderlinePosition
public int getUnderlinePosition() throws InvalidFontException
Get the underline position.- Throws:
InvalidFontException
-
getUnderlineThickness
public int getUnderlineThickness() throws InvalidFontException
Get the underline thickness.- Throws:
InvalidFontException
-
isFixedPitch
public boolean isFixedPitch() throws InvalidFontException
- Throws:
InvalidFontException
-
getNumberOfGlyphs
public int getNumberOfGlyphs() throws InvalidFontException
Get the number of glyphs.- Returns:
- -1 if the table does not have this data
- Throws:
InvalidFontException
-
getGlyphName
public String getGlyphName(int gid)
Get the name of a glyph.- Returns:
- null if this information is not present, the name of the glyph otherwise
-
glyphName2gid
public int glyphName2gid(String name) throws InvalidFontException
Get the index of a glyph given its name.- Returns:
- 0 if there is no glyph with the name
- Throws:
InvalidFontException
-
subsetAndStreamForCFF
public void subsetAndStreamForCFF(Map tables) throws InvalidFontException
- Throws:
InvalidFontException
-
subsetAndStream
public void subsetAndStream(Subset subset, SubsetSimpleTrueType ttSubset, Map tables) throws UnsupportedFontException, InvalidFontException
-
stream
public void stream(Map tables)
-
-