Package org.apache.fontbox.afm
Class AFMParser
java.lang.Object
org.apache.fontbox.afm.AFMParser
This class is used to parse AFM(Adobe Font Metrics) documents.
- Version:
- $Revision: 1.1 $
- Author:
- Ben Litchfield (ben@benlitchfield.com)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
This is ascender attribute.static final String
This is the cap height attribute.static final String
This is a composite character.static final String
This is the char width.static final String
This is the character set.static final String
This is the characters attribute.static final String
The character metrics value.static final String
The character metrics c value.static final String
The character metrics c value.static final String
The character metrics value.static final String
The character metrics value.static final String
The character metrics value.static final String
The character metrics value.static final String
The character metrics value.static final String
The character metrics value.static final String
The character metrics value.static final String
The character metrics value.static final String
The character metrics value.static final String
The character metrics value.static final String
The character metrics value.static final String
The character metrics value.static final String
This is a comment in a AFM file.static final String
This is the descender attribute.static final String
This is the encoding scheme.static final String
This is the end of character metrics.static final String
This is the end compisites data section.static final String
This is the constant used in the AFM file to end a font metrics item.static final String
This is the end of kern data.static final String
This is the end of kern pairs data.static final String
This is the end of track kern data.static final String
This is the escape character.static final String
This is the Family name.static final String
This is the font bounding box.static final String
This is the font name.static final String
This is the full name.static final String
This will determine if this is a base font.static final String
This will determine if this is fixed pitch.static final String
This will tell if the V is fixed.static final String
This is the italic angle.static final String
This is a kern pair.static final String
This is a kern pair.static final String
This is a kern pair.static final String
This is a kern pair.static final String
This is the mapping scheme.static final String
This is the notice.static final String
This is a composite charater part.static final String
This is the start of character metrics.static final String
This is the start compisites data section.static final String
This is the constant used in the AFM file to start a font metrics item.static final String
This is the start of kern data.static final String
This is the start of kern pairs data.static final String
This is the start of kern pairs data.static final String
This is the start of kern pairs data.static final String
This is the start of track kern data.static final String
The character metrics value.static final String
The character metrics value.static final String
The underline position.static final String
This is the Underline thickness.static final String
This is the V Vector attribute.static final String
This is the version of the font.static final String
This is the weight.static final String
This is the X height. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis will get the result of the parsing.static void
A method to test parsing of all AFM documents in the resources directory.void
parse()
This will parse the AFM document.
-
Field Details
-
COMMENT
This is a comment in a AFM file.- See Also:
-
START_FONT_METRICS
This is the constant used in the AFM file to start a font metrics item.- See Also:
-
END_FONT_METRICS
This is the constant used in the AFM file to end a font metrics item.- See Also:
-
FONT_NAME
This is the font name.- See Also:
-
FULL_NAME
This is the full name.- See Also:
-
FAMILY_NAME
This is the Family name.- See Also:
-
WEIGHT
This is the weight.- See Also:
-
FONT_BBOX
This is the font bounding box.- See Also:
-
VERSION
This is the version of the font.- See Also:
-
NOTICE
This is the notice.- See Also:
-
ENCODING_SCHEME
This is the encoding scheme.- See Also:
-
MAPPING_SCHEME
This is the mapping scheme.- See Also:
-
ESC_CHAR
This is the escape character.- See Also:
-
CHARACTER_SET
This is the character set.- See Also:
-
CHARACTERS
This is the characters attribute.- See Also:
-
IS_BASE_FONT
This will determine if this is a base font.- See Also:
-
V_VECTOR
This is the V Vector attribute.- See Also:
-
IS_FIXED_V
This will tell if the V is fixed.- See Also:
-
CAP_HEIGHT
This is the cap height attribute.- See Also:
-
X_HEIGHT
This is the X height.- See Also:
-
ASCENDER
This is ascender attribute.- See Also:
-
DESCENDER
This is the descender attribute.- See Also:
-
UNDERLINE_POSITION
The underline position.- See Also:
-
UNDERLINE_THICKNESS
This is the Underline thickness.- See Also:
-
ITALIC_ANGLE
This is the italic angle.- See Also:
-
CHAR_WIDTH
This is the char width.- See Also:
-
IS_FIXED_PITCH
This will determine if this is fixed pitch.- See Also:
-
START_CHAR_METRICS
This is the start of character metrics.- See Also:
-
END_CHAR_METRICS
This is the end of character metrics.- See Also:
-
CHARMETRICS_C
The character metrics c value.- See Also:
-
CHARMETRICS_CH
The character metrics c value.- See Also:
-
CHARMETRICS_WX
The character metrics value.- See Also:
-
CHARMETRICS_W0X
The character metrics value.- See Also:
-
CHARMETRICS_W1X
The character metrics value.- See Also:
-
CHARMETRICS_WY
The character metrics value.- See Also:
-
CHARMETRICS_W0Y
The character metrics value.- See Also:
-
CHARMETRICS_W1Y
The character metrics value.- See Also:
-
CHARMETRICS_W
The character metrics value.- See Also:
-
CHARMETRICS_W0
The character metrics value.- See Also:
-
CHARMETRICS_W1
The character metrics value.- See Also:
-
CHARMETRICS_VV
The character metrics value.- See Also:
-
CHARMETRICS_N
The character metrics value.- See Also:
-
CHARMETRICS_B
The character metrics value.- See Also:
-
CHARMETRICS_L
The character metrics value.- See Also:
-
STD_HW
The character metrics value.- See Also:
-
STD_VW
The character metrics value.- See Also:
-
START_TRACK_KERN
This is the start of track kern data.- See Also:
-
END_TRACK_KERN
This is the end of track kern data.- See Also:
-
START_KERN_DATA
This is the start of kern data.- See Also:
-
END_KERN_DATA
This is the end of kern data.- See Also:
-
START_KERN_PAIRS
This is the start of kern pairs data.- See Also:
-
END_KERN_PAIRS
This is the end of kern pairs data.- See Also:
-
START_KERN_PAIRS0
This is the start of kern pairs data.- See Also:
-
START_KERN_PAIRS1
This is the start of kern pairs data.- See Also:
-
START_COMPOSITES
This is the start compisites data section.- See Also:
-
END_COMPOSITES
This is the end compisites data section.- See Also:
-
CC
This is a composite character.- See Also:
-
PCC
This is a composite charater part.- See Also:
-
KERN_PAIR_KP
This is a kern pair.- See Also:
-
KERN_PAIR_KPH
This is a kern pair.- See Also:
-
KERN_PAIR_KPX
This is a kern pair.- See Also:
-
KERN_PAIR_KPY
This is a kern pair.- See Also:
-
-
Constructor Details
-
AFMParser
Constructor.- Parameters:
in
- The input stream to read the AFM document from.
-
-
Method Details
-
main
A method to test parsing of all AFM documents in the resources directory.- Parameters:
args
- Ignored.- Throws:
IOException
- If there is an error parsing one of the documents.
-
parse
This will parse the AFM document. This will close the Input stream when the parsing is finished.- Throws:
IOException
- If there is an IO error reading the document.
-
getResult
This will get the result of the parsing.- Returns:
- The parsed java object.
-