Package org.apache.fontbox.cff
Class Type1CharStringParser
- java.lang.Object
-
- org.apache.fontbox.cff.Type1CharStringParser
-
public class Type1CharStringParser extends java.lang.ObjectThis class represents a converter for a mapping into a Type 1 sequence.- See Also:
- "Adobe Type 1 Font Format, Adobe Systems (1999)"
-
-
Field Summary
Fields Modifier and Type Field Description private static intCALLOTHERSUBRprivate static intCALLSUBRprivate java.lang.StringcurrentGlyphprivate java.lang.StringfontNameprivate static org.apache.commons.logging.LogLOGprivate static intPOPprivate static intTWO_BYTE
-
Constructor Summary
Constructors Constructor Description Type1CharStringParser(java.lang.String fontName)Constructs a new Type1CharStringParser object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Object>parse(byte[] bytes, java.util.List<byte[]> subrs, java.lang.String glyphName)The given byte array will be parsed and converted to a Type1 sequence.private java.util.List<java.lang.Object>parse(byte[] bytes, java.util.List<byte[]> subrs, java.util.List<java.lang.Object> sequence)private voidprocessCallOtherSubr(DataInput input, java.util.List<java.lang.Object> sequence)private voidprocessCallSubr(java.util.List<byte[]> subrs, java.util.List<java.lang.Object> sequence)private CharStringCommandreadCommand(DataInput input, int b0)private java.lang.IntegerreadNumber(DataInput input, int b0)private static java.lang.IntegerremoveInteger(java.util.List<java.lang.Object> sequence)
-
-
-
Field Detail
-
LOG
private static final org.apache.commons.logging.Log LOG
-
CALLSUBR
private static final int CALLSUBR
- See Also:
- Constant Field Values
-
TWO_BYTE
private static final int TWO_BYTE
- See Also:
- Constant Field Values
-
CALLOTHERSUBR
private static final int CALLOTHERSUBR
- See Also:
- Constant Field Values
-
POP
private static final int POP
- See Also:
- Constant Field Values
-
fontName
private final java.lang.String fontName
-
currentGlyph
private java.lang.String currentGlyph
-
-
Method Detail
-
parse
public java.util.List<java.lang.Object> parse(byte[] bytes, java.util.List<byte[]> subrs, java.lang.String glyphName) throws java.io.IOExceptionThe 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:
java.io.IOException- if an error occurs during reading
-
parse
private java.util.List<java.lang.Object> parse(byte[] bytes, java.util.List<byte[]> subrs, java.util.List<java.lang.Object> sequence) throws java.io.IOException- Throws:
java.io.IOException
-
processCallSubr
private void processCallSubr(java.util.List<byte[]> subrs, java.util.List<java.lang.Object> sequence) throws java.io.IOException- Throws:
java.io.IOException
-
processCallOtherSubr
private void processCallOtherSubr(DataInput input, java.util.List<java.lang.Object> sequence) throws java.io.IOException
- Throws:
java.io.IOException
-
removeInteger
private static java.lang.Integer removeInteger(java.util.List<java.lang.Object> sequence) throws java.io.IOException- Throws:
java.io.IOException
-
readCommand
private CharStringCommand readCommand(DataInput input, int b0) throws java.io.IOException
- Throws:
java.io.IOException
-
readNumber
private java.lang.Integer readNumber(DataInput input, int b0) throws java.io.IOException
- Throws:
java.io.IOException
-
-