public abstract class BaseCharStringParser extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
bias |
protected int |
gBias |
protected CFFIndex |
globalSubrs |
protected CFFIndex |
localSubrs |
protected Stack<CFFNumber> |
stack |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseCharStringParser(ASInputStream stream)
Constructor that calls method parse(), so width is extracted right after
object is created.
|
protected |
BaseCharStringParser(ASInputStream stream,
CFFIndex localSubrs,
int bias,
CFFIndex globalSubrs,
int gBias)
Constructor that calls method parse(), so width is extracted right after
object is created.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addStream(ASInputStream is) |
CFFNumber |
getWidth() |
protected void |
popStack(int num)
Pops several operands from Type 1 Build Char stack.
|
protected abstract boolean |
processNextOperator(int nextByte)
This method processes charstring-encoded operators.
|
protected abstract CFFNumber |
readNextNumber(int firstByte)
This method reads next bytes from stream and interprets them as one
number.
|
protected int |
readStreams(byte[] buffer,
int size) |
protected void |
setWidth(CFFNumber width) |
protected CFFIndex globalSubrs
protected CFFIndex localSubrs
protected int bias
protected int gBias
protected BaseCharStringParser(ASInputStream stream) throws IOException
stream - is stream with decoded CharString.IOException - if parsing fails.protected BaseCharStringParser(ASInputStream stream, CFFIndex localSubrs, int bias, CFFIndex globalSubrs, int gBias) throws IOException
stream - is stream with decoded CharString.localSubrs - is local subroutines for this CharString.bias - is bias value for local subroutines as it is described
in The Compact Font Format specification.gBias - is bias value for global subroutines as it is described
in The Compact Font Format specification.IOException - if parsing fails.public CFFNumber getWidth()
protected void setWidth(CFFNumber width)
protected int readStreams(byte[] buffer,
int size)
throws IOException
IOExceptionprotected void addStream(ASInputStream is)
protected void popStack(int num)
num - is amount of numbers to be popped.IOException - if stream reading error occurs.protected abstract boolean processNextOperator(int nextByte)
throws IOException
nextByte - is first byte of operator. Note that this byte is already
read.IOException - if stream reading error occurs.protected abstract CFFNumber readNextNumber(int firstByte) throws IOException
IOException - if stream reading error occurs.Copyright © 2015–2019 The veraPDF Consortium. All rights reserved.