Package org.apache.fontbox.cff
Class Type1CharStringParser
- java.lang.Object
-
- org.apache.fontbox.cff.Type1CharStringParser
-
public class Type1CharStringParser extends java.lang.Object
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
Fields Modifier and Type Field Description (package private) static int
CALLOTHERSUBR
(package private) static int
CALLSUBR
private java.lang.String
fontName
private java.lang.String
glyphName
private static org.apache.commons.logging.Log
LOG
(package private) static int
POP
(package private) static int
RETURN
(package private) static int
TWO_BYTE
-
Constructor Summary
Constructors Constructor Description Type1CharStringParser(java.lang.String fontName, java.lang.String glyphName)
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)
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 CharStringCommand
readCommand(DataInput input, int b0)
private java.lang.Integer
readNumber(DataInput input, int b0)
private static java.lang.Integer
removeInteger(java.util.List<java.lang.Object> sequence)
-
-
-
Field Detail
-
LOG
private static final org.apache.commons.logging.Log LOG
-
RETURN
static final int RETURN
- See Also:
- Constant Field Values
-
CALLSUBR
static final int CALLSUBR
- See Also:
- Constant Field Values
-
TWO_BYTE
static final int TWO_BYTE
- See Also:
- Constant Field Values
-
CALLOTHERSUBR
static final int CALLOTHERSUBR
- See Also:
- Constant Field Values
-
POP
static final int POP
- See Also:
- Constant Field Values
-
fontName
private final java.lang.String fontName
-
glyphName
private final java.lang.String glyphName
-
-
Method Detail
-
parse
public java.util.List<java.lang.Object> parse(byte[] bytes, java.util.List<byte[]> subrs) throws java.io.IOException
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:
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
-
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
-
-