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:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionType1CharStringParser(String fontName) Constructs a new Type1CharStringParser object. -
Method Summary
Modifier and TypeMethodDescriptionThe given byte array will be parsed and converted to a Type1 sequence.private voidprocessCallOtherSubr(DataInput input, List<Object> sequence) private voidprocessCallSubr(List<byte[]> subrs, List<Object> sequence) private CharStringCommandreadCommand(DataInput input, int b0) private IntegerreadNumber(DataInput input, int b0) private static IntegerremoveInteger(List<Object> sequence)
-
Field Details
-
LOG
private static final org.apache.commons.logging.Log LOG -
CALLSUBR
private static final int CALLSUBR- See Also:
-
TWO_BYTE
private static final int TWO_BYTE- See Also:
-
CALLOTHERSUBR
private static final int CALLOTHERSUBR- See Also:
-
POP
private static final int POP- See Also:
-
fontName
-
currentGlyph
-
-
Constructor Details
-
Type1CharStringParser
Constructs a new Type1CharStringParser object.- Parameters:
fontName- font 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 subroutinesglyphName- name of the current glyph- 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
-
processCallSubr
- Throws:
IOException
-
processCallOtherSubr
- Throws:
IOException
-
removeInteger
- Throws:
IOException
-
readCommand
- Throws:
IOException
-
readNumber
- Throws:
IOException
-