public class TtfVirtualMachine extends Object implements TtfInstructionVisitor
Currently can handle all stack and control operations but only like 15% of the graphics state related instructions
| Modifier and Type | Class and Description |
|---|---|
static class |
TtfVirtualMachine.TtfVmRuntimeException |
| Modifier and Type | Field and Description |
|---|---|
int |
jumpOffset |
| Constructor and Description |
|---|
TtfVirtualMachine(OpenTypeFont font) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(List<TtfInstruction> instructions) |
void |
execute(TtfInstruction instruction) |
OpenTypeFont |
getFont() |
TtfFunction |
getFunction(Integer function) |
TtfGraphicsState |
getGraphicsState() |
Integer |
getLoopVar() |
Long |
getStorageAreaValue(Long index) |
void |
setLoopVar(Integer loopVar) |
void |
setStorageAreaValue(Long index,
Long value) |
boolean |
shouldExecuteBranch() |
void |
visit(ElseInstruction instruction) |
void |
visit(EndFunctionInstruction instruction) |
void |
visit(EndIfInstruction instruction) |
void |
visit(FunctionDefInstruction instruction) |
void |
visit(IfInstruction instruction) |
void |
visitGeneric(TtfInstruction instruction) |
public TtfVirtualMachine(OpenTypeFont font)
public void execute(List<TtfInstruction> instructions) throws IOException
IOExceptionpublic void execute(TtfInstruction instruction) throws IOException
IOExceptionpublic void visitGeneric(TtfInstruction instruction) throws IOException
visitGeneric in interface TtfInstructionVisitorIOExceptionpublic void visit(IfInstruction instruction) throws IOException
visit in interface TtfInstructionVisitorIOExceptionpublic void visit(ElseInstruction instruction) throws IOException
visit in interface TtfInstructionVisitorIOExceptionpublic void visit(EndIfInstruction instruction) throws IOException
visit in interface TtfInstructionVisitorIOExceptionpublic void visit(FunctionDefInstruction instruction) throws IOException
visit in interface TtfInstructionVisitorIOExceptionpublic void visit(EndFunctionInstruction instruction) throws IOException
visit in interface TtfInstructionVisitorIOExceptionpublic boolean shouldExecuteBranch()
public TtfFunction getFunction(Integer function)
public OpenTypeFont getFont()
public TtfGraphicsState getGraphicsState()
public void setLoopVar(Integer loopVar)
public Integer getLoopVar()
Copyright © 2018. All rights reserved.