|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.fop.fonts.TTFFile
Reads a TrueType file or a TrueType Collection. The TrueType spec can be found at the Microsoft Typography site: http://www.microsoft.com/truetype/
Constructor Summary | |
TTFFile()
|
Method Summary | |
protected boolean |
checkTTC(FontFileReader in,
java.lang.String name,
boolean verbose)
Check if this is a TrueType collection and that the given name exists in the collection. |
java.util.HashMap |
getAnsiKerning()
|
int |
getCapHeight()
|
java.lang.String |
getCharSetName()
|
int |
getCharWidth(int idx)
|
java.util.ArrayList |
getCMaps()
Return a ArrayList with TTFCmapEntry |
java.lang.String |
getFamilyName()
|
short |
getFirstChar()
|
int |
getFlags()
|
int[] |
getFontBBox()
|
java.lang.String |
getItalicAngle()
|
java.util.HashMap |
getKerning()
|
short |
getLastChar()
|
int |
getLowerCaseAscent()
|
int |
getLowerCaseDescent()
|
protected void |
getNumGlyphs(FontFileReader in)
Read the number of glyphs from the "maxp" table |
java.lang.String |
getPostscriptName()
|
java.lang.String |
getStemV()
|
int[] |
getWidths()
|
java.lang.String |
getWindowsName()
|
int |
getXHeight()
|
boolean |
isEmbeddable()
|
static void |
main(java.lang.String[] args)
|
void |
printStuff()
|
protected void |
readDirTabs(FontFileReader in)
Read Table Directory from the current position in the FontFileReader and fill the global HashMap dirTabs with the table name (String) as key and a TTFDirTabEntry as value. |
void |
readFont(FontFileReader in)
|
void |
readFont(FontFileReader in,
java.lang.String name)
Read the font data If the fontfile is a TrueType Collection (.ttc file) The name of the font to read data for must be supplied, else the name is ignored |
protected void |
readFontHeader(FontFileReader in)
Read the "head" table, this reads the bounding box and sets the upem (unitsPerEM) variable |
protected void |
readHorizontalHeader(FontFileReader in)
Read the "hhea" table to find the ascender and descender and size of "hmtx" table, i.e. |
protected void |
readHorizontalMetrics(FontFileReader in)
Read "hmtx" table and put the horizontal metrics in the mtx_tab array. |
protected void |
readIndexToLocation(FontFileReader in)
Read the "loca" table |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TTFFile()
Method Detail |
public void readFont(FontFileReader in) throws java.io.IOException
public void readFont(FontFileReader in, java.lang.String name) throws java.io.IOException
public void printStuff()
public static void main(java.lang.String[] args)
public java.lang.String getWindowsName()
public java.lang.String getPostscriptName()
public java.lang.String getFamilyName()
public java.lang.String getCharSetName()
public int getCapHeight()
public int getXHeight()
public int getFlags()
public java.lang.String getStemV()
public java.lang.String getItalicAngle()
public int[] getFontBBox()
public int getLowerCaseAscent()
public int getLowerCaseDescent()
public short getLastChar()
public short getFirstChar()
public int[] getWidths()
public int getCharWidth(int idx)
public java.util.HashMap getKerning()
public java.util.HashMap getAnsiKerning()
public boolean isEmbeddable()
protected void readDirTabs(FontFileReader in) throws java.io.IOException
protected void readFontHeader(FontFileReader in) throws java.io.IOException
protected void getNumGlyphs(FontFileReader in) throws java.io.IOException
protected void readHorizontalHeader(FontFileReader in) throws java.io.IOException
protected void readHorizontalMetrics(FontFileReader in) throws java.io.IOException
protected final void readIndexToLocation(FontFileReader in) throws java.io.IOException
public java.util.ArrayList getCMaps()
protected final boolean checkTTC(FontFileReader in, java.lang.String name, boolean verbose) throws java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |