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
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetGlyphName(int gid)Get the name of a glyph.intgetItalicAngle()intgetNumberOfGlyphs()Get the number of glyphs.intgetTableMajorVersion()Get the major version of this table.intgetTableMinorVersion()Get the minor version of this table.intgetUnderlinePosition()Get the underline position.intgetUnderlineThickness()Get the underline thickness.intglyphName2gid(java.lang.String name)Get the index of a glyph given its name.booleanisFixedPitch()voidstream(java.util.Map tables)voidsubsetAndStream(Subset subset, SubsetSimpleTrueType ttSubset, java.util.Map tables)voidsubsetAndStreamForCFF(java.util.Map tables)
-
-
-
Method Detail
-
getTableMajorVersion
public int getTableMajorVersion() throws InvalidFontExceptionGet the major version of this table.- Throws:
InvalidFontException
-
getTableMinorVersion
public int getTableMinorVersion() throws InvalidFontExceptionGet the minor version of this table.- Throws:
InvalidFontException
-
getItalicAngle
public int getItalicAngle() throws InvalidFontException- Throws:
InvalidFontException
-
getUnderlinePosition
public int getUnderlinePosition() throws InvalidFontExceptionGet the underline position.- Throws:
InvalidFontException
-
getUnderlineThickness
public int getUnderlineThickness() throws InvalidFontExceptionGet the underline thickness.- Throws:
InvalidFontException
-
isFixedPitch
public boolean isFixedPitch() throws InvalidFontException- Throws:
InvalidFontException
-
getNumberOfGlyphs
public int getNumberOfGlyphs() throws InvalidFontExceptionGet the number of glyphs.- Returns:
- -1 if the table does not have this data
- Throws:
InvalidFontException
-
getGlyphName
public java.lang.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(java.lang.String name) throws InvalidFontExceptionGet the index of a glyph given its name.- Returns:
- 0 if there is no glyph with the name
- Throws:
InvalidFontException
-
subsetAndStreamForCFF
public void subsetAndStreamForCFF(java.util.Map tables) throws InvalidFontException- Throws:
InvalidFontException
-
subsetAndStream
public void subsetAndStream(Subset subset, SubsetSimpleTrueType ttSubset, java.util.Map tables) throws UnsupportedFontException, InvalidFontException
-
stream
public void stream(java.util.Map tables)
-
-