org.extex.font.format.xtf.tables
Class TtfTableGLYF.SimpleDescript

java.lang.Object
  extended by org.extex.font.format.xtf.tables.TtfTableGLYF.Descript
      extended by org.extex.font.format.xtf.tables.TtfTableGLYF.SimpleDescript
All Implemented Interfaces:
XMLWriterConvertible
Enclosing class:
TtfTableGLYF

public class TtfTableGLYF.SimpleDescript
extends TtfTableGLYF.Descript

SimleDescript.

the table specifies the format of a simple glyph. A more detailed description 0f glyph outline requirements is given in Digitizing Letterform Designs.

Type Name Description
uint16 endPtsOfContours[n] Array of last points of each contour; n is the number of contours; array entries are point indices
uint16 instructionLength Total number of bytes needed for instructions
uint8 instructions[instructionLength] Array of instructions for this glyph
uint8 flags[variable] Array of flags
uint8 or int16 xCoordinates[] Array of x-coordinates; the first is relative to (0,0), others are relative to previous point
uint8 or int16 yCoordinates[] Array of y-coordinates; the first is relative to (0,0), others are relative to previous point

Each entry in the flags array is a byte in size.The meanings associated with each bit in that byte are given in Table 16 below.

Flags Bit (0 is lsb) Description
On Curve 0 If set, the point is on the curve;
Otherwise, it is off the curve.
x-Short Vector 1 If set, the corresponding x-coordinate is 1 byte long;
Otherwise, the corresponding x-coordinate is 2 bytes long
y-Short Vector 2 If set, the corresponding y-coordinate is 1 byte long;
Otherwise, the corresponding y-coordinate is 2 bytes long
Repeat 3 If set, the next byte specifies the number of additional times this set of flags is to be repeated. In this way, the number of flags listed can be smaller than the number of points in a character.
This x is same (Positive x-Short vector) 4 This flag has one of two meanings, depending on how the x-Short Vector flag is set.
If the x-Short Vector bit is set, this bit describes the sign of the value, with a value of 1 equalling positive and a zero value negative.
If the x-short Vector bit is not set, and this bit is set, then the current x-coordinate is the same as the previous x-coordinate.
If the x-short Vector bit is not set, and this bit is not set, the current x-coordinate is a signed 16-bit delta vector. In this case, the delta vector is the change in x
This y is same (Positive y-Short vector) 5 This flag has one of two meanings, depending on how the y-Short Vector flag is set.
If the y-Short Vector bit is set, this bit describes the sign of the value, with a value of 1 equalling positive and a zero value negative.
If the y-short Vector bit is not set, and this bit is set, then the current y-coordinate is the same as the previous y-coordinate.
Reserved 6 - 7 Set to zero


Field Summary
 
Fields inherited from class org.extex.font.format.xtf.tables.TtfTableGLYF.Descript
ONCURVE, parentTable, REPEAT, XDUAL, XSHORTVECTOR, YDUAL, YSHORTVECTOR
 
Method Summary
 int getContourCount()
          Returns the contour count.
 int getEndPtOfContours(int i)
          Returns the end pt of contours
 byte getFlags(int i)
          Returns the flags.
 int getPointCount()
          Returns the point count.
 short getXCoordinate(int i)
          Returns the x coordinate.
 short getYCoordinate(int i)
          Returns the y coordinate.
 boolean isComposite()
          Returns the composite.
 
Methods inherited from class org.extex.font.format.xtf.tables.TtfTableGLYF.Descript
getInstructions, getNumberOfContours, getXMax, getXMin, getYMax, getYMin, readInstructions, readInstructions, writeXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getContourCount

public int getContourCount()
Returns the contour count.

Returns:
Returns the contour count.
See Also:
TtfTableGLYF.Descript.getContourCount()

getEndPtOfContours

public int getEndPtOfContours(int i)
Returns the end pt of contours

Parameters:
i - the index
Returns:
Returns the end pt of contours
See Also:
TtfTableGLYF.Descript.getEndPtOfContours(int)

getFlags

public byte getFlags(int i)
Returns the flags.

Parameters:
i - the index
Returns:
Returns the flags.
See Also:
TtfTableGLYF.Descript.getFlags(int)

getPointCount

public int getPointCount()
Returns the point count.

Returns:
Returns the point count.
See Also:
TtfTableGLYF.Descript.getPointCount()

getXCoordinate

public short getXCoordinate(int i)
Returns the x coordinate.

Parameters:
i - the index
Returns:
Returns the x coordinate
See Also:
TtfTableGLYF.Descript.getXCoordinate(int)

getYCoordinate

public short getYCoordinate(int i)
Returns the y coordinate.

Parameters:
i - the index
Returns:
Returns the y coordinate
See Also:
TtfTableGLYF.Descript.getYCoordinate(int)

isComposite

public boolean isComposite()
Returns the composite.

Returns:
Returns the composite.
See Also:
TtfTableGLYF.Descript.isComposite()