Top Description Fields Constructors Methods
org.apache.fontbox.ttf

public abstract Class GlyfDescript

extends Object
implements GlyphDescription
Class Inheritance
All Implemented Interfaces
org.apache.fontbox.ttf.GlyphDescription
Known Direct Subclasses
org.apache.fontbox.ttf.GlyfSimpleDescript, org.apache.fontbox.ttf.GlyfCompositeDescript
Imports
java.io.IOException

This class is based on code from Apache Batik a subproject of Apache XMLGraphics. see http://xmlgraphics.apache.org/batik/ for further details.

Field Summary

Modifier and TypeField and Description
private final int
private int[]
public static final byte
ON_CURVE

if set, the point is on the curve.

public static final byte
REPEAT

if set, the next byte specifies the number of additional times this set of flags is to be repeated.

public static final byte
X_DUAL

This flag as two meanings, depending on how the x-short vector flags is set.

public static final byte
X_SHORT_VECTOR

if set, the x-coordinate is 1 byte long.

public static final byte
Y_DUAL

This flag as two meanings, depending on how the y-short vector flags is set.

public static final byte
Y_SHORT_VECTOR

if set, the y-coordinate is 1 byte long.

Constructor Summary

AccessConstructor and Description
pack-priv
GlyfDescript(short
the number of contours
numberOfContours
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public int
getContourCount()

Implements org.apache.fontbox.ttf.GlyphDescription.getContourCount.

Returns the number of contours.

public int[]

Returns:

an array containing the hinting instructions.
getInstructions
()

Returns the hinting instructions.

pack-priv void
readInstructions(TTFDataStream
the stream to be read
bais
,
int
the number of instructions to be read
count
)

Read the hinting instructions.

public void
resolve()

Implements org.apache.fontbox.ttf.GlyphDescription.resolve.

Resolve all parts of an composite glyph.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contourCountback to summary
private final int contourCount
instructionsback to summary
private int[] instructions
ON_CURVEback to summary
public static final byte ON_CURVE

if set, the point is on the curve.

REPEATback to summary
public static final byte REPEAT

if set, the next byte specifies the number of additional times this set of flags is to be repeated.

X_DUALback to summary
public static final byte X_DUAL

This flag as two meanings, depending on how the x-short vector flags is set. If the x-short vector is set, this bit describes the sign of the value, with 1 equaling positive and 0 positive. If the x-short vector is not set and this bit is also not set, the current x-coordinate is a signed 16-bit delta vector.

X_SHORT_VECTORback to summary
public static final byte X_SHORT_VECTOR

if set, the x-coordinate is 1 byte long.

Y_DUALback to summary
public static final byte Y_DUAL

This flag as two meanings, depending on how the y-short vector flags is set. If the y-short vector is set, this bit describes the sign of the value, with 1 equaling positive and 0 positive. If the y-short vector is not set and this bit is also not set, the current y-coordinate is a signed 16-bit delta vector.

Y_SHORT_VECTORback to summary
public static final byte Y_SHORT_VECTOR

if set, the y-coordinate is 1 byte long.

Constructor Detail

GlyfDescriptback to summary
pack-priv GlyfDescript(short numberOfContours)

Constructor.

Parameters
numberOfContours:short

the number of contours

Method Detail

getContourCountback to summary
public int getContourCount()

Implements org.apache.fontbox.ttf.GlyphDescription.getContourCount.

Doc from org.apache.fontbox.ttf.GlyphDescription.getContourCount.

Returns the number of contours.

Returns:int

the number of contours

Annotations
@Override
getInstructionsback to summary
public int[] getInstructions()

Returns the hinting instructions.

Returns:int[]

an array containing the hinting instructions.

readInstructionsback to summary
pack-priv void readInstructions(TTFDataStream bais, int count) throws IOException

Read the hinting instructions.

Parameters
bais:TTFDataStream

the stream to be read

count:int

the number of instructions to be read

Exceptions
IOException:
is thrown if something went wrong
resolveback to summary
public void resolve()

Implements org.apache.fontbox.ttf.GlyphDescription.resolve.

Doc from org.apache.fontbox.ttf.GlyphDescription.resolve.

Resolve all parts of an composite glyph.

Annotations
@Override