intarsys CWT library

de.intarsys.cwt.font.afm
Class AFM

java.lang.Object
  extended by de.intarsys.cwt.font.afm.AFM

public class AFM
extends Object

A 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
static String ATTR_FontName
           
 
Method Summary
static AFM createFromLocator(de.intarsys.tools.locator.ILocator locator)
           
static AFM createNew()
           
 String getAttribute(String name)
          The string value for a generic attribute designated by name.
 AFMChar getCharByCode(int codePoint)
          The character representation for a byte code point given in codePoint.
 AFMChar getCharByName(String name)
          The character representation for an adobe glyph name given in name.
 String getFontName()
           
 de.intarsys.tools.locator.ILocator getLocator()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_FontName

public static final String ATTR_FontName
See Also:
Constant Field Values
Method Detail

createFromLocator

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

createNew

public static AFM createNew()

getAttribute

public String getAttribute(String name)
The string value for a generic attribute designated by name.

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 in codePoint.

Parameters:
codePoint - The byte code point.
Returns:
The character representation for a byte code point given in codePoint.

getCharByName

public AFMChar getCharByName(String name)
The character representation for an adobe glyph name given in name.

Parameters:
name - The adobe glyph name.
Returns:
The character representation for an adobe glyph name given in name.

getFontName

public String getFontName()

getLocator

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

intarsys CWT library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.