Package de.intarsys.cwt.font.afm
Class AFM
- java.lang.Object
-
- de.intarsys.cwt.font.afm.AFM
-
public class AFM extends java.lang.ObjectA simple implementation for an adobe font metric object.This implementation will hold all afm attributes in a generic collection. The char metrics are read explicitly and held in a list of AFMChar's. No other information (like kerning) is extracted.
See the "Adobe Font Metrics File Format Specification"
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTR_FontName
-
Constructor Summary
Constructors Modifier Constructor Description protectedAFM()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddChar(AFMChar c)static AFMcreateFromLocator(de.intarsys.tools.locator.ILocator locator)static AFMcreateNew()java.lang.StringgetAttribute(java.lang.String name)The string value for a generic attribute designated byname.AFMChargetCharByCode(int codePoint)The character representation for a byte code point given incodePoint.AFMChargetCharByName(java.lang.String name)The character representation for an adobe glyph name given inname.java.lang.StringgetFontName()de.intarsys.tools.locator.ILocatorgetLocator()protected voidinitializeFromLocator()protected voidsetAttribute(java.lang.String name, java.lang.String value)protected voidsetLocator(de.intarsys.tools.locator.ILocator locator)
-
-
-
Field Detail
-
ATTR_FontName
public static final java.lang.String ATTR_FontName
- See Also:
- Constant Field Values
-
-
Method Detail
-
createFromLocator
public static AFM createFromLocator(de.intarsys.tools.locator.ILocator locator) throws java.io.IOException
- Throws:
java.io.IOException
-
createNew
public static AFM createNew()
-
addChar
protected void addChar(AFMChar c)
-
getAttribute
public java.lang.String getAttribute(java.lang.String name)
The string value for a generic attribute designated byname.- Parameters:
name- The name of the attribute to lookup.- Returns:
- The string value for a generic attribute designated by
name.
-
getCharByCode
public AFMChar getCharByCode(int codePoint)
The character representation for a byte code point given incodePoint.- Parameters:
codePoint- The byte code point.- Returns:
- The character representation for a byte code point given in
codePoint.
-
getCharByName
public AFMChar getCharByName(java.lang.String name)
The character representation for an adobe glyph name given inname.- Parameters:
name- The adobe glyph name.- Returns:
- The character representation for an adobe glyph name given in
name.
-
getFontName
public java.lang.String getFontName()
-
getLocator
public de.intarsys.tools.locator.ILocator getLocator()
-
initializeFromLocator
protected void initializeFromLocator() throws java.io.IOException- Throws:
java.io.IOException
-
setAttribute
protected void setAttribute(java.lang.String name, java.lang.String value)
-
setLocator
protected void setLocator(de.intarsys.tools.locator.ILocator locator)
-
-