de.intarsys.cwt.font.afm
public class AFMParser extends java.lang.Object
See the "Adobe Font Metrics File Format Specification"
Modifier and Type | Field and Description |
---|---|
static char |
CHAR_BS |
static char |
CHAR_CR |
static char |
CHAR_FF |
static char |
CHAR_HT |
static char |
CHAR_LF |
protected static byte[] |
characterClass |
protected static byte |
CHARCLASS_ANY |
protected static byte |
CHARCLASS_DELIMITER |
protected static byte |
CHARCLASS_DIGIT |
protected static byte |
CHARCLASS_NUMBERSPECIAL |
protected static byte |
CHARCLASS_TOKEN |
protected static byte |
CHARCLASS_WHITESPACE |
Constructor and Description |
---|
AFMParser(AFM afm)
AFMParser constructor comment.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isEOL(int i)
evaluate to true if i is a valid line terminator.
|
static boolean |
isWhitespace(int i)
evaluate to true if i is a valid whitespace.
|
AFM |
parse(de.intarsys.tools.randomaccess.IRandomAccess random)
Parse a
AFM object from the input stream is . |
protected void |
read(de.intarsys.tools.randomaccess.IRandomAccess random) |
protected byte[] |
readBlock(de.intarsys.tools.randomaccess.IRandomAccess random)
ignore this and any nested Start/End pair
|
protected byte[] |
readCharMetrics(de.intarsys.tools.randomaccess.IRandomAccess random) |
protected byte[] |
readFontMetrics(de.intarsys.tools.randomaccess.IRandomAccess random) |
byte[] |
readLine(de.intarsys.tools.randomaccess.IRandomAccess input)
read a single line.
|
protected byte[] |
readLineElement(de.intarsys.tools.randomaccess.IRandomAccess input,
int next) |
void |
readSpaces(de.intarsys.tools.randomaccess.IRandomAccess input)
read all characters until EOF or non space char appears.
|
byte[] |
readToken(de.intarsys.tools.randomaccess.IRandomAccess input)
read a single token.
|
protected byte[] |
readTokenElement(de.intarsys.tools.randomaccess.IRandomAccess input,
int next) |
protected static final byte[] characterClass
protected static final byte CHARCLASS_ANY
protected static final byte CHARCLASS_DELIMITER
protected static final byte CHARCLASS_DIGIT
protected static final byte CHARCLASS_NUMBERSPECIAL
protected static final byte CHARCLASS_TOKEN
protected static final byte CHARCLASS_WHITESPACE
public static char CHAR_BS
public static char CHAR_CR
public static char CHAR_FF
public static char CHAR_HT
public static char CHAR_LF
public AFMParser(AFM afm)
public static final boolean isEOL(int i)
i
- i a byte representationpublic static final boolean isWhitespace(int i)
i
- i a byte representationpublic AFM parse(de.intarsys.tools.randomaccess.IRandomAccess random) throws java.io.IOException
AFM
object from the input stream is
.is
- The input stream containing the definition.AFM
parsed.java.io.IOException
protected void read(de.intarsys.tools.randomaccess.IRandomAccess random) throws java.io.IOException
java.io.IOException
protected byte[] readBlock(de.intarsys.tools.randomaccess.IRandomAccess random) throws java.io.IOException
java.io.IOException
protected byte[] readCharMetrics(de.intarsys.tools.randomaccess.IRandomAccess random) throws java.io.IOException
java.io.IOException
protected byte[] readFontMetrics(de.intarsys.tools.randomaccess.IRandomAccess random) throws java.io.IOException
java.io.IOException
public byte[] readLine(de.intarsys.tools.randomaccess.IRandomAccess input) throws java.io.IOException
java.io.IOException
protected byte[] readLineElement(de.intarsys.tools.randomaccess.IRandomAccess input, int next) throws java.io.IOException
java.io.IOException
public void readSpaces(de.intarsys.tools.randomaccess.IRandomAccess input) throws java.io.IOException
java.io.IOException
public byte[] readToken(de.intarsys.tools.randomaccess.IRandomAccess input) throws java.io.IOException
java.io.IOException
protected byte[] readTokenElement(de.intarsys.tools.randomaccess.IRandomAccess input, int next) throws java.io.IOException
java.io.IOException