Package de.intarsys.cwt.font.truetype
Class TTFont
java.lang.Object
de.intarsys.cwt.font.truetype.TTFont
This class represents a true type font. Currently only single font files are
supported.
This class is under construction and not meant for a complete TT implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final byte[]
static final byte[]
static final byte[]
static final byte[]
static final byte[]
static final byte[]
static final byte[]
static final byte[]
static final byte[]
static final byte[]
static final byte[]
static final byte[]
static final byte[]
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
align
(int newLength) static TTFont
createFromLocator
(de.intarsys.tools.locator.ILocator locator) getCMaps()
getCMapsAt
(int platformID, int platformSpecificID) int
getGlyphWidth
(int codePoint) protected int[]
de.intarsys.tools.locator.ILocator
int
getTable
(byte[] name) TTTable[]
protected void
void
removeCMapsAt
(int platformID, int platformSpecificID) protected void
setFontFamilyName
(String string) protected void
setFontName
(TTFont font) protected void
setFontStyle
(FontStyle fontStyle) protected void
setLocator
(de.intarsys.tools.locator.ILocator locator) void
protected void
setSfntVersion
(int sfntVersion) protected void
-
Field Details
-
ARG_1_AND_2_ARE_WORDS
public static final int ARG_1_AND_2_ARE_WORDS- See Also:
-
MORE_COMPONENTS
public static final int MORE_COMPONENTS- See Also:
-
SFNT_TRUETYPE
public static final int SFNT_TRUETYPE- See Also:
-
TABLE_CMAP
public static final byte[] TABLE_CMAP -
TABLE_CVT
public static final byte[] TABLE_CVT -
TABLE_FGPM
public static final byte[] TABLE_FGPM -
TABLE_GLYF
public static final byte[] TABLE_GLYF -
TABLE_HEAD
public static final byte[] TABLE_HEAD -
TABLE_HHEA
public static final byte[] TABLE_HHEA -
TABLE_HMTX
public static final byte[] TABLE_HMTX -
TABLE_LOCA
public static final byte[] TABLE_LOCA -
TABLE_MAXP
public static final byte[] TABLE_MAXP -
TABLE_NAME
public static final byte[] TABLE_NAME -
TABLE_OS2
public static final byte[] TABLE_OS2 -
TABLE_POST
public static final byte[] TABLE_POST -
TABLE_PREP
public static final byte[] TABLE_PREP -
WE_HAVE_A_SCALE
public static final int WE_HAVE_A_SCALE- See Also:
-
WE_HAVE_A_TWO_BY_TWO
public static final int WE_HAVE_A_TWO_BY_TWO- See Also:
-
WE_HAVE_AN_X_AND_Y_SCALE
public static final int WE_HAVE_AN_X_AND_Y_SCALE- See Also:
-
-
Constructor Details
-
TTFont
protected TTFont()Create an empty true type font.
-
-
Method Details
-
align
public static int align(int newLength) -
createFromLocator
public static TTFont createFromLocator(de.intarsys.tools.locator.ILocator locator) throws IOException - Throws:
IOException
-
getCMaps
- Throws:
TrueTypeException
-
getCMapsAt
- Throws:
TrueTypeException
-
getFontFamilyName
-
getFontHeader
- Throws:
TrueTypeException
-
getFontName
-
getFontStyle
-
getGlyphWidth
- Throws:
TrueTypeException
-
getGlyphWidths
- Throws:
TrueTypeException
-
getHorizontalHeader
- Throws:
TrueTypeException
-
getLocator
public de.intarsys.tools.locator.ILocator getLocator() -
getMetrics
- Throws:
TrueTypeException
-
getNaming
- Throws:
TrueTypeException
-
getPostScriptInformation
- Throws:
TrueTypeException
-
getPsName
-
getSfntVersion
public int getSfntVersion() -
getTable
-
getTables
-
initializeFromLocator
- Throws:
IOException
-
removeCMapsAt
public void removeCMapsAt(int platformID, int platformSpecificID) throws TrueTypeException, IOException - Throws:
TrueTypeException
IOException
-
setFontFamilyName
-
setFontName
- Throws:
TrueTypeException
-
setFontStyle
-
setLocator
protected void setLocator(de.intarsys.tools.locator.ILocator locator) -
setPsName
-
setSfntVersion
protected void setSfntVersion(int sfntVersion) -
setTables
-