Package org.apache.fontbox.cff
Class Type1CharStringParser
java.lang.Object
org.apache.fontbox.cff.Type1CharStringParser
This class represents a converter for a mapping into a Type 1 sequence.
- See Also:
-
- "Adobe Type 1 Font Format, Adobe Systems (1999)"
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int
(package private) static final int
private final String
private final String
private static final org.apache.commons.logging.Log
(package private) static final int
(package private) static final int
(package private) static final int
-
Constructor Summary
ConstructorsConstructorDescriptionType1CharStringParser
(String fontName, String glyphName) Constructs a new Type1CharStringParser object. -
Method Summary
Modifier and TypeMethodDescriptionThe given byte array will be parsed and converted to a Type1 sequence.private CharStringCommand
readCommand
(DataInput input, int b0) private Integer
readNumber
(DataInput input, int b0) private static Integer
removeInteger
(List<Object> sequence)
-
Field Details
-
LOG
private static final org.apache.commons.logging.Log LOG -
RETURN
static final int RETURN- See Also:
-
CALLSUBR
static final int CALLSUBR- See Also:
-
TWO_BYTE
static final int TWO_BYTE- See Also:
-
CALLOTHERSUBR
static final int CALLOTHERSUBR- See Also:
-
POP
static final int POP- See Also:
-
fontName
-
glyphName
-
-
Constructor Details
-
Type1CharStringParser
Constructs a new Type1CharStringParser object.- Parameters:
fontName
- font nameglyphName
- glyph name
-
-
Method Details
-
parse
The given byte array will be parsed and converted to a Type1 sequence.- Parameters:
bytes
- the given mapping as byte arraysubrs
- list of local subroutines- Returns:
- the Type1 sequence
- Throws:
IOException
- if an error occurs during reading
-
parse
private List<Object> parse(byte[] bytes, List<byte[]> subrs, List<Object> sequence) throws IOException - Throws:
IOException
-
removeInteger
- Throws:
IOException
-
readCommand
- Throws:
IOException
-
readNumber
- Throws:
IOException
-