intarsys CWT library

de.intarsys.cwt.font.truetype
Class TTFont

java.lang.Object
  extended by de.intarsys.cwt.font.truetype.TTFont

public class TTFont
extends Object

This class represents a true type font. Currently only single font files are supported. The bytes defining the font are read completely and stored for later use. This class is under construction, it's use is for reading true types and make some operations on it rather than creating from the scratch.


Field Summary
static int ARG_1_AND_2_ARE_WORDS
           
static int MORE_COMPONENTS
           
static byte[][] SubsetTables
           
static byte[] TABLE_CMAP
           
static byte[] TABLE_CVT
           
static byte[] TABLE_FGPM
           
static byte[] TABLE_GLYF
           
static byte[] TABLE_HEAD
           
static byte[] TABLE_HHEA
           
static byte[] TABLE_HMTX
           
static byte[] TABLE_LOCA
           
static byte[] TABLE_MAXP
           
static byte[] TABLE_NAME
           
static byte[] TABLE_OS2
           
static byte[] TABLE_POST
           
static byte[] TABLE_PREP
           
static int WE_HAVE_A_SCALE
           
static int WE_HAVE_A_TWO_BY_TWO
           
static int WE_HAVE_AN_X_AND_Y_SCALE
           
 
Method Summary
static TTFont createFromLocator(de.intarsys.tools.locator.ILocator locator)
           
 TTFont createSubset(Set glyphs)
           
 Map getCMaps()
           
 Map getCMapsAt(int platformID, int platformSpecificID)
           
 String getFontFamilyName()
           
 TTFontHeader getFontHeader()
           
 String getFontName()
           
 FontStyle getFontStyle()
           
 int getGlyphWidth(int codePoint)
           
 TTHorizontalHeader getHorizontalHeader()
           
 de.intarsys.tools.locator.ILocator getLocator()
           
 TTMetrics getMetrics()
           
 TTNaming getNaming()
           
 TTPostScriptInformation getPostScriptInformation()
           
 String getPsName()
           
 TTTable getTable(byte[] name)
           
 TTTable[] getTables()
           
 void setPsName(String string)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLE_POST

public static final byte[] TABLE_POST

TABLE_PREP

public static final byte[] TABLE_PREP

TABLE_LOCA

public static final byte[] TABLE_LOCA

TABLE_GLYF

public static final byte[] TABLE_GLYF

TABLE_FGPM

public static final byte[] TABLE_FGPM

TABLE_CVT

public static final byte[] TABLE_CVT

TABLE_OS2

public static final byte[] TABLE_OS2

TABLE_NAME

public static final byte[] TABLE_NAME

TABLE_MAXP

public static final byte[] TABLE_MAXP

TABLE_HMTX

public static final byte[] TABLE_HMTX

TABLE_HHEA

public static final byte[] TABLE_HHEA

TABLE_HEAD

public static final byte[] TABLE_HEAD

TABLE_CMAP

public static final byte[] TABLE_CMAP

ARG_1_AND_2_ARE_WORDS

public static final int ARG_1_AND_2_ARE_WORDS
See Also:
Constant Field Values

WE_HAVE_A_SCALE

public static final int WE_HAVE_A_SCALE
See Also:
Constant Field Values

MORE_COMPONENTS

public static final int MORE_COMPONENTS
See Also:
Constant Field Values

WE_HAVE_AN_X_AND_Y_SCALE

public static final int WE_HAVE_AN_X_AND_Y_SCALE
See Also:
Constant Field Values

WE_HAVE_A_TWO_BY_TWO

public static final int WE_HAVE_A_TWO_BY_TWO
See Also:
Constant Field Values

SubsetTables

public static byte[][] SubsetTables
Method Detail

createFromLocator

public static TTFont createFromLocator(de.intarsys.tools.locator.ILocator locator)
                                throws IOException
Throws:
IOException

createSubset

public TTFont createSubset(Set glyphs)
                    throws IOException,
                           TrueTypeException
Throws:
IOException
TrueTypeException

getCMaps

public Map getCMaps()
             throws TrueTypeException
Throws:
TrueTypeException

getCMapsAt

public Map getCMapsAt(int platformID,
                      int platformSpecificID)
               throws TrueTypeException
Throws:
TrueTypeException

getFontFamilyName

public String getFontFamilyName()

getFontHeader

public TTFontHeader getFontHeader()
                           throws TrueTypeException
Throws:
TrueTypeException

getFontName

public String getFontName()

getFontStyle

public FontStyle getFontStyle()

getGlyphWidth

public int getGlyphWidth(int codePoint)
                  throws TrueTypeException
Throws:
TrueTypeException

getHorizontalHeader

public TTHorizontalHeader getHorizontalHeader()
                                       throws TrueTypeException
Throws:
TrueTypeException

getLocator

public de.intarsys.tools.locator.ILocator getLocator()

getMetrics

public TTMetrics getMetrics()
                     throws TrueTypeException
Throws:
TrueTypeException

getNaming

public TTNaming getNaming()
                   throws TrueTypeException
Throws:
TrueTypeException

getPostScriptInformation

public TTPostScriptInformation getPostScriptInformation()
                                                 throws TrueTypeException
Throws:
TrueTypeException

getPsName

public String getPsName()

getTable

public TTTable getTable(byte[] name)

getTables

public TTTable[] getTables()

setPsName

public void setPsName(String string)

intarsys CWT library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.