Package de.intarsys.cwt.font.afm
Class AFMChar
- java.lang.Object
-
- de.intarsys.cwt.font.afm.AFMChar
-
public class AFMChar extends java.lang.Object
A 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.String
AFM_TOKEN_C
static java.lang.String
AFM_TOKEN_CH
static java.lang.String
AFM_TOKEN_N
static java.lang.String
AFM_TOKEN_W
static java.lang.String
AFM_TOKEN_W0
static java.lang.String
AFM_TOKEN_W0X
static java.lang.String
AFM_TOKEN_WX
-
Constructor Summary
Constructors Modifier Constructor Description protected
AFMChar(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 AFMChar
create(java.lang.String glyph)
Create a new glyph representation from the definition parsed fromglyph
.int
getCode()
The glyphs code.java.lang.String
getName()
The glyphs name.int
getWidth()
The glyphs width.java.lang.String
toString()
-
-
-
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:
toString
in classjava.lang.Object
-
-