public class TTVM extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected static int |
GLYPH_ZONE |
protected static int |
ORIGINAL |
protected static int |
TWILIGHT_ZONE |
| Constructor and Description |
|---|
TTVM(FontFile2 currentFontFile,
Maxp maxp) |
| Modifier and Type | Method and Description |
|---|---|
protected static double |
getDoubleFromF26Dot6(int a)
Takes a F26Dot6 number and returns the value as a double.
|
protected static double |
getDoubleFromF2Dot14(int a)
Takes a F2Dot14 number and returns the value as a double.
|
static String[] |
getInstructionsAsStringArray(int[] program)
DEBUG METHOD -
|
static boolean[] |
getInstructionStreamIsData(int[] program)
DEBUG METHOD -
|
protected static int |
getIntFrom2Uint8(int high,
int low)
Takes two Uint8s containing 8 bits of data each and converts them to a
signed integer.
|
static void |
print(int[] program)
DEBUG METHOD -
|
boolean |
processGlyph(int[] instructions,
int[] glyfX,
int[] glyfY,
boolean[] curves,
boolean[] contours)
Takes the information about a glyph specified and modifies it according
to the instructions provided.
|
void |
setScaleVars(double scaler,
double ppem,
double ptSize)
Sets the scale variables for a font - if it's changed, the CVT needs to
be rescaled, and the PreProgram (sometimes called CVT program) must be
run again.
|
protected static int |
storeDoubleAsF26Dot6(double a)
Takes a double and returns the value as a F26Dot6 number.
|
protected static int |
storeDoubleAsF2Dot14(double a)
Takes a double and returns the value as a F2Dot14 number.
|
protected static final int TWILIGHT_ZONE
protected static final int GLYPH_ZONE
protected static final int ORIGINAL
public void setScaleVars(double scaler,
double ppem,
double ptSize)
scaler - The value to multiply any unscaled values byppem - The number of pixels per em squareptSize - The point size of the textpublic boolean processGlyph(int[] instructions,
int[] glyfX,
int[] glyfY,
boolean[] curves,
boolean[] contours)
instructions - The instructions to executeglyfX - A list of scaled X coordinates for the pointsglyfY - A list of scaled Y coordinates for the pointscurves - Whether each point is on the curve or notcontours - Whether each point is the last in a contourprotected static int getIntFrom2Uint8(int high,
int low)
high - first intlow - second intprotected static double getDoubleFromF26Dot6(int a)
a - F26Dot6 valueprotected static double getDoubleFromF2Dot14(int a)
a - F2Dot14 valueprotected static int storeDoubleAsF26Dot6(double a)
a - Double valueprotected static int storeDoubleAsF2Dot14(double a)
a - Double valuepublic static void print(int[] program)
Prints out a set of instructions without executing them. It's not a quick method, as it uses reflection to do so!
program - Instructions to printpublic static String[] getInstructionsAsStringArray(int[] program)
Converts an array of instructions in bytecode into a human-readable string array for display.
program - public static boolean[] getInstructionStreamIsData(int[] program)
Converts an instruction stream into a boolean array indicating whether a line is an instruction or data.
program - Copyright © 2017. All rights reserved.