Package de.intarsys.cwt.font.afm
Class AFMChar
- java.lang.Object
-
- de.intarsys.cwt.font.afm.AFMChar
-
public class AFMChar extends java.lang.ObjectA simple implementation for an AFM char metric objectThis implementation will hold the information needed for implementing a simple pdf field layout mechanism. All attributes but name, code, and with are ignored.
See the "Adobe Font Metrics File Format Specification"
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAFM_TOKEN_Cstatic java.lang.StringAFM_TOKEN_CHstatic java.lang.StringAFM_TOKEN_Nstatic java.lang.StringAFM_TOKEN_Wstatic java.lang.StringAFM_TOKEN_W0static java.lang.StringAFM_TOKEN_W0Xstatic java.lang.StringAFM_TOKEN_WX
-
Constructor Summary
Constructors Modifier Constructor Description protectedAFMChar(int code, int width, java.lang.String name)AFMChar constructor comment.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AFMCharcreate(java.lang.String glyph)Create a new glyph representation from the definition parsed fromglyph.intgetCode()The glyphs code.java.lang.StringgetName()The glyphs name.intgetWidth()The glyphs width.java.lang.StringtoString()
-
-
-
Field Detail
-
AFM_TOKEN_WX
public static java.lang.String AFM_TOKEN_WX
-
AFM_TOKEN_W
public static java.lang.String AFM_TOKEN_W
-
AFM_TOKEN_W0X
public static java.lang.String AFM_TOKEN_W0X
-
AFM_TOKEN_W0
public static java.lang.String AFM_TOKEN_W0
-
AFM_TOKEN_N
public static java.lang.String AFM_TOKEN_N
-
AFM_TOKEN_CH
public static java.lang.String AFM_TOKEN_CH
-
AFM_TOKEN_C
public static java.lang.String AFM_TOKEN_C
-
-
Method Detail
-
create
public static AFMChar create(java.lang.String glyph)
Create a new glyph representation from the definition parsed fromglyph.- Parameters:
glyph- A string containing a definition for the glyph.- Returns:
- The new glyph representation.
-
getCode
public int getCode()
The glyphs code.- Returns:
- The glyphs code.
-
getName
public java.lang.String getName()
The glyphs name.- Returns:
- The glyphs name.
-
getWidth
public int getWidth()
The glyphs width.- Returns:
- The glyphs width.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-