|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.font.format.ttf.TTFOffsetTable
public final class TTFOffsetTable
A TrueType or OpenType Offset Table, the very first item in the content of a font. Even though it calls itself a "table" it is not part of the TrueType table hierarchy. It is a table of tables that describes how to find each of the tables in the font. Note that although it is the first item in the content of a font, it may not be the first item in the content of a font file. If the file is a TrueType collection of some sort, the offset to the Offset Table for each font is indicated in the TTCHeader.
Field Summary | |
---|---|
static byte |
OFFSET_TABLE_SIZE
Constant indicating the size of the table directory itself, in bytes. |
static byte |
SEARCH_RANGE_CONSTANT
Constant used in the computation of the search range and range shift values. |
static int |
TTF_FILE_SFNT_VERSION_1
Constant indicating the sfnt version for the table directory. |
Method Summary | |
---|---|
protected TTFOffsetTableRecord |
getTableDirectoryEntry(String tableName)
Return the table directory entry for a given table name. |
TrueTypeContainer |
getTTFFile()
Returns the parent TTFFile. |
TrueTypeFont |
getTTFFont()
Returns the TTFFont related to this table directory. |
static TTFOffsetTable |
parse(TrueTypeContainer container,
RandomAccessInput raInput,
long fileOffset)
Parse a Table Directory from the appropriate offset. |
void |
parseFont()
Parses the font described by this table directory and stores the parsed instance in this for retrieval with getTTFFont() . |
void |
setTTFFont(TrueTypeFont newFont)
Sets the TTFFont for this table directory. |
boolean |
ttfFontCreated()
Indicates whether the font has been created. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TTF_FILE_SFNT_VERSION_1
public static final byte SEARCH_RANGE_CONSTANT
public static final byte OFFSET_TABLE_SIZE
Method Detail |
---|
public static TTFOffsetTable parse(TrueTypeContainer container, RandomAccessInput raInput, long fileOffset) throws IOException
container
- The font parent container.raInput
- The input being parsed.fileOffset
- The offset to the specific font in container
that should be parsed (remember that a
TTF font file can contain more than one TTF font.
IOException
- For I/O error.protected TTFOffsetTableRecord getTableDirectoryEntry(String tableName)
tableName
- The name of the table whose table directory entry is
sought.
tableName
.public boolean ttfFontCreated()
TrueTypeFont
instance has been instantiated.public void parseFont() throws IOException
getTTFFont()
.
IOException
- For I/O errors during parsing.public TrueTypeFont getTTFFont()
public void setTTFFont(TrueTypeFont newFont)
newFont
- The TTFFont for this table directory.public TrueTypeContainer getTTFFile()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |