| Modifier and Type | Field and Description |
|---|---|
| public static final String | ASCENDER
This is ascender attribute. |
| private static final int | |
| public static final String | CAP_HEIGHT
This is the cap height attribute. |
| public static final String | CC
This is a composite character. |
| public static final String | CHAR_WIDTH
This is the char width. |
| public static final String | CHARACTER_SET
This is the character set. |
| public static final String | CHARACTERS
This is the characters attribute. |
| public static final String | CHARMETRICS_B
The character metrics value. |
| public static final String | CHARMETRICS_C
The character metrics c value. |
| public static final String | CHARMETRICS_CH
The character metrics c value. |
| public static final String | CHARMETRICS_L
The character metrics value. |
| public static final String | CHARMETRICS_N
The character metrics value. |
| public static final String | CHARMETRICS_VV
The character metrics value. |
| public static final String | CHARMETRICS_W
The character metrics value. |
| public static final String | CHARMETRICS_W0
The character metrics value. |
| public static final String | CHARMETRICS_W0X
The character metrics value. |
| public static final String | CHARMETRICS_W0Y
The character metrics value. |
| public static final String | CHARMETRICS_W1
The character metrics value. |
| public static final String | CHARMETRICS_W1X
The character metrics value. |
| public static final String | CHARMETRICS_W1Y
The character metrics value. |
| public static final String | CHARMETRICS_WX
The character metrics value. |
| public static final String | CHARMETRICS_WY
The character metrics value. |
| public static final String | COMMENT
This is a comment in a AFM file. |
| public static final String | DESCENDER
This is the descender attribute. |
| public static final String | ENCODING_SCHEME
This is the encoding scheme. |
| public static final String | END_CHAR_METRICS
This is the end of character metrics. |
| public static final String | END_COMPOSITES
This is the end composites data section. |
| public static final String | END_FONT_METRICS
This is the constant used in the AFM file to end a font metrics item. |
| public static final String | END_KERN_DATA
This is the end of kern data. |
| public static final String | END_KERN_PAIRS
This is the end of kern pairs data. |
| public static final String | END_TRACK_KERN
This is the end of track kern data. |
| public static final String | ESC_CHAR
This is the escape character. |
| public static final String | FAMILY_NAME
This is the Family name. |
| public static final String | FONT_BBOX
This is the font bounding box. |
| public static final String | FONT_NAME
This is the font name. |
| public static final String | FULL_NAME
This is the full name. |
| private final InputStream | |
| public static final String | IS_BASE_FONT
This will determine if this is a base font. |
| public static final String | IS_FIXED_PITCH
This will determine if this is fixed pitch. |
| public static final String | IS_FIXED_V
This will tell if the V is fixed. |
| public static final String | ITALIC_ANGLE
This is the italic angle. |
| public static final String | KERN_PAIR_KP
This is a kern pair. |
| public static final String | KERN_PAIR_KPH
This is a kern pair. |
| public static final String | KERN_PAIR_KPX
This is a kern pair. |
| public static final String | KERN_PAIR_KPY
This is a kern pair. |
| public static final String | MAPPING_SCHEME
This is the mapping scheme. |
| public static final String | NOTICE
This is the notice. |
| public static final String | PCC
This is a composite character part. |
| public static final String | START_CHAR_METRICS
This is the start of character metrics. |
| public static final String | START_COMPOSITES
This is the start composites data section. |
| public static final String | START_FONT_METRICS
This is the constant used in the AFM file to start a font metrics item. |
| public static final String | START_KERN_DATA
This is the start of kern data. |
| public static final String | START_KERN_PAIRS
This is the start of kern pairs data. |
| public static final String | START_KERN_PAIRS0
This is the start of kern pairs data. |
| public static final String | START_KERN_PAIRS1
This is the start of kern pairs data. |
| public static final String | START_TRACK_KERN
This is the start of track kern data. |
| public static final String | STD_HW
The character metrics value. |
| public static final String | STD_VW
The character metrics value. |
| public static final String | UNDERLINE_POSITION
The underline position. |
| public static final String | UNDERLINE_THICKNESS
This is the Underline thickness. |
| public static final String | V_VECTOR
This is the V Vector attribute. |
| public static final String | VERSION
This is the version of the font. |
| public static final String | WEIGHT
This is the weight. |
| public static final String | X_HEIGHT
This is the X height. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private String | Returns: The bytes of the hex string.An angle bracket string. hexToString)This will convert and angle bracket hex string to a string. |
| private static boolean | Returns: true If the character is whitespace as defined by the AFM spec.The character to test for whitespace. character)This will determine if the byte is a whitespace character or not. |
| private static boolean | Returns: true If the character is whitespace as defined by the AFM spec.The character to test for whitespace. character)This will determine if the byte is a whitespace character or not. |
| public FontMetrics | |
| public FontMetrics | Returns: the parsed FontMetricparse a reduced subset of data if set to true reducedDataset)This will parse the AFM document. |
| private CharMetric | Returns: The next char metric in the stream.This will parse a single CharMetric object from the stream. |
| private boolean | |
| private Composite | |
| private void | |
| private float | |
| private FontMetrics | Returns: The parse font metrics item.This will parse a font metrics item. |
| private int | |
| private int | |
| private void | parseKernData(FontMetrics
The metrics class to put the parsed data into. fontMetrics)This will parse the kern data. |
| private KernPair | Returns: The kern pair that was parsed from the stream.This will parse a kern pair from the data stream. |
| private void | |
| private void | |
| private void | |
| private boolean | |
| private void | |
| private float | |
| private int | |
| private String | |
| private String | Returns: The string read from the stream.This will read a string from the input stream and stop at any whitespace. |
| private void | verifySemicolon(StringTokenizer
The tokenizer to read from. tokenizer)This is used to verify that a semicolon is the next token in the stream. |
| ASCENDER | back to summary |
|---|---|
| public static final String ASCENDER This is ascender attribute. | |
| BITS_IN_HEX | back to summary |
|---|---|
| private static final int BITS_IN_HEX | |
| CAP_HEIGHT | back to summary |
|---|---|
| public static final String CAP_HEIGHT This is the cap height attribute. | |
| CC | back to summary |
|---|---|
| public static final String CC This is a composite character. | |
| CHAR_WIDTH | back to summary |
|---|---|
| public static final String CHAR_WIDTH This is the char width. | |
| CHARACTER_SET | back to summary |
|---|---|
| public static final String CHARACTER_SET This is the character set. | |
| CHARACTERS | back to summary |
|---|---|
| public static final String CHARACTERS This is the characters attribute. | |
| CHARMETRICS_B | back to summary |
|---|---|
| public static final String CHARMETRICS_B The character metrics value. | |
| CHARMETRICS_C | back to summary |
|---|---|
| public static final String CHARMETRICS_C The character metrics c value. | |
| CHARMETRICS_CH | back to summary |
|---|---|
| public static final String CHARMETRICS_CH The character metrics c value. | |
| CHARMETRICS_L | back to summary |
|---|---|
| public static final String CHARMETRICS_L The character metrics value. | |
| CHARMETRICS_N | back to summary |
|---|---|
| public static final String CHARMETRICS_N The character metrics value. | |
| CHARMETRICS_VV | back to summary |
|---|---|
| public static final String CHARMETRICS_VV The character metrics value. | |
| CHARMETRICS_W | back to summary |
|---|---|
| public static final String CHARMETRICS_W The character metrics value. | |
| CHARMETRICS_W0 | back to summary |
|---|---|
| public static final String CHARMETRICS_W0 The character metrics value. | |
| CHARMETRICS_W0X | back to summary |
|---|---|
| public static final String CHARMETRICS_W0X The character metrics value. | |
| CHARMETRICS_W0Y | back to summary |
|---|---|
| public static final String CHARMETRICS_W0Y The character metrics value. | |
| CHARMETRICS_W1 | back to summary |
|---|---|
| public static final String CHARMETRICS_W1 The character metrics value. | |
| CHARMETRICS_W1X | back to summary |
|---|---|
| public static final String CHARMETRICS_W1X The character metrics value. | |
| CHARMETRICS_W1Y | back to summary |
|---|---|
| public static final String CHARMETRICS_W1Y The character metrics value. | |
| CHARMETRICS_WX | back to summary |
|---|---|
| public static final String CHARMETRICS_WX The character metrics value. | |
| CHARMETRICS_WY | back to summary |
|---|---|
| public static final String CHARMETRICS_WY The character metrics value. | |
| COMMENT | back to summary |
|---|---|
| public static final String COMMENT This is a comment in a AFM file. | |
| DESCENDER | back to summary |
|---|---|
| public static final String DESCENDER This is the descender attribute. | |
| ENCODING_SCHEME | back to summary |
|---|---|
| public static final String ENCODING_SCHEME This is the encoding scheme. | |
| END_CHAR_METRICS | back to summary |
|---|---|
| public static final String END_CHAR_METRICS This is the end of character metrics. | |
| END_COMPOSITES | back to summary |
|---|---|
| public static final String END_COMPOSITES This is the end composites data section. | |
| END_FONT_METRICS | back to summary |
|---|---|
| public static final String END_FONT_METRICS This is the constant used in the AFM file to end a font metrics item. | |
| END_KERN_DATA | back to summary |
|---|---|
| public static final String END_KERN_DATA This is the end of kern data. | |
| END_KERN_PAIRS | back to summary |
|---|---|
| public static final String END_KERN_PAIRS This is the end of kern pairs data. | |
| END_TRACK_KERN | back to summary |
|---|---|
| public static final String END_TRACK_KERN This is the end of track kern data. | |
| ESC_CHAR | back to summary |
|---|---|
| public static final String ESC_CHAR This is the escape character. | |
| FAMILY_NAME | back to summary |
|---|---|
| public static final String FAMILY_NAME This is the Family name. | |
| FONT_BBOX | back to summary |
|---|---|
| public static final String FONT_BBOX This is the font bounding box. | |
| FONT_NAME | back to summary |
|---|---|
| public static final String FONT_NAME This is the font name. | |
| FULL_NAME | back to summary |
|---|---|
| public static final String FULL_NAME This is the full name. | |
| input | back to summary |
|---|---|
| private final InputStream input | |
| IS_BASE_FONT | back to summary |
|---|---|
| public static final String IS_BASE_FONT This will determine if this is a base font. | |
| IS_FIXED_PITCH | back to summary |
|---|---|
| public static final String IS_FIXED_PITCH This will determine if this is fixed pitch. | |
| IS_FIXED_V | back to summary |
|---|---|
| public static final String IS_FIXED_V This will tell if the V is fixed. | |
| ITALIC_ANGLE | back to summary |
|---|---|
| public static final String ITALIC_ANGLE This is the italic angle. | |
| KERN_PAIR_KP | back to summary |
|---|---|
| public static final String KERN_PAIR_KP This is a kern pair. | |
| KERN_PAIR_KPH | back to summary |
|---|---|
| public static final String KERN_PAIR_KPH This is a kern pair. | |
| KERN_PAIR_KPX | back to summary |
|---|---|
| public static final String KERN_PAIR_KPX This is a kern pair. | |
| KERN_PAIR_KPY | back to summary |
|---|---|
| public static final String KERN_PAIR_KPY This is a kern pair. | |
| MAPPING_SCHEME | back to summary |
|---|---|
| public static final String MAPPING_SCHEME This is the mapping scheme. | |
| NOTICE | back to summary |
|---|---|
| public static final String NOTICE This is the notice. | |
| PCC | back to summary |
|---|---|
| public static final String PCC This is a composite character part. | |
| START_CHAR_METRICS | back to summary |
|---|---|
| public static final String START_CHAR_METRICS This is the start of character metrics. | |
| START_COMPOSITES | back to summary |
|---|---|
| public static final String START_COMPOSITES This is the start composites data section. | |
| START_FONT_METRICS | back to summary |
|---|---|
| public static final String START_FONT_METRICS This is the constant used in the AFM file to start a font metrics item. | |
| START_KERN_DATA | back to summary |
|---|---|
| public static final String START_KERN_DATA This is the start of kern data. | |
| START_KERN_PAIRS | back to summary |
|---|---|
| public static final String START_KERN_PAIRS This is the start of kern pairs data. | |
| START_KERN_PAIRS0 | back to summary |
|---|---|
| public static final String START_KERN_PAIRS0 This is the start of kern pairs data. | |
| START_KERN_PAIRS1 | back to summary |
|---|---|
| public static final String START_KERN_PAIRS1 This is the start of kern pairs data. | |
| START_TRACK_KERN | back to summary |
|---|---|
| public static final String START_TRACK_KERN This is the start of track kern data. | |
| STD_HW | back to summary |
|---|---|
| public static final String STD_HW The character metrics value. | |
| STD_VW | back to summary |
|---|---|
| public static final String STD_VW The character metrics value. | |
| UNDERLINE_POSITION | back to summary |
|---|---|
| public static final String UNDERLINE_POSITION The underline position. | |
| UNDERLINE_THICKNESS | back to summary |
|---|---|
| public static final String UNDERLINE_THICKNESS This is the Underline thickness. | |
| V_VECTOR | back to summary |
|---|---|
| public static final String V_VECTOR This is the V Vector attribute. | |
| VERSION | back to summary |
|---|---|
| public static final String VERSION This is the version of the font. | |
| WEIGHT | back to summary |
|---|---|
| public static final String WEIGHT This is the weight. | |
| X_HEIGHT | back to summary |
|---|---|
| public static final String X_HEIGHT This is the X height. | |
| AFMParser | back to summary |
|---|---|
| public AFMParser(InputStream in) Constructor.
| |
| hexToString | back to summary |
|---|---|
| private String hexToString(String hexToString) throws IOException This will convert and angle bracket hex string to a string.
| |
| isEOL | back to summary |
|---|---|
| private static boolean isEOL(int character) This will determine if the byte is a whitespace character or not.
| |
| isWhitespace | back to summary |
|---|---|
| private static boolean isWhitespace(int character) This will determine if the byte is a whitespace character or not.
| |
| parse | back to summary |
|---|---|
| public FontMetrics parse() throws IOException This will parse the AFM document. The input stream is closed when the parsing is finished.
| |
| parse | back to summary |
|---|---|
| public FontMetrics parse(boolean reducedDataset) throws IOException This will parse the AFM document. The input stream is closed when the parsing is finished.
| |
| parseCharMetric | back to summary |
|---|---|
| private CharMetric parseCharMetric() throws IOException This will parse a single CharMetric object from the stream.
| |
| parseCharMetrics | back to summary |
|---|---|
| private boolean parseCharMetrics(FontMetrics fontMetrics) throws IOException | |
| parseComposite | back to summary |
|---|---|
| private Composite parseComposite() throws IOException This will parse a composite part from the stream.
| |
| parseComposites | back to summary |
|---|---|
| private void parseComposites(FontMetrics fontMetrics) throws IOException | |
| parseFloat | back to summary |
|---|---|
| private float parseFloat(String floatValue) throws IOException | |
| parseFontMetric | back to summary |
|---|---|
| private FontMetrics parseFontMetric(boolean reducedDataset) throws IOException This will parse a font metrics item.
| |
| parseInt | back to summary |
|---|---|
| private int parseInt(String intValue) throws IOException | |
| parseInt | back to summary |
|---|---|
| private int parseInt(String intValue, int radix) throws IOException | |
| parseKernData | back to summary |
|---|---|
| private void parseKernData(FontMetrics fontMetrics) throws IOException This will parse the kern data.
| |
| parseKernPair | back to summary |
|---|---|
| private KernPair parseKernPair() throws IOException This will parse a kern pair from the data stream.
| |
| parseKernPairs | back to summary |
|---|---|
| private void parseKernPairs(FontMetrics fontMetrics) throws IOException | |
| parseKernPairs0 | back to summary |
|---|---|
| private void parseKernPairs0(FontMetrics fontMetrics) throws IOException | |
| parseKernPairs1 | back to summary |
|---|---|
| private void parseKernPairs1(FontMetrics fontMetrics) throws IOException | |
| readBoolean | back to summary |
|---|---|
| private boolean readBoolean() throws IOException This will read a boolean from the stream.
| |
| readCommand | back to summary |
|---|---|
| private void readCommand(String expectedCommand) throws IOException Read the next string. Throw an exception if it differs from the expected command.
| |
| readFloat | back to summary |
|---|---|
| private float readFloat() throws IOException This will read a float from the stream.
| |
| readInt | back to summary |
|---|---|
| private int readInt() throws IOException This will read an integer from the stream.
| |
| readLine | back to summary |
|---|---|
| private String readLine() throws IOException This will read until the end of a line.
| |
| readString | back to summary |
|---|---|
| private String readString() throws IOException This will read a string from the input stream and stop at any whitespace.
| |
| verifySemicolon | back to summary |
|---|---|
| private void verifySemicolon(StringTokenizer tokenizer) throws IOException This is used to verify that a semicolon is the next token in the stream.
| |