|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.font.format.xtf.tables.TtfTableGLYF.Descript
public abstract static class TtfTableGLYF.Descript
Simple Glyph Description.
| Type | Name | Description |
| USHORT | endPtsOfContours[n] | Array of last points of each contour; n is the number of contours.|
| USHORT | instructionLength | Total number of bytes for instructions. |
| BYTE | instructions[n] | Array of instructions for each glyph; n is the number of instructions. |
| BYTE | flags[n] | Array of flags for each coordinate in outline; n is the number of flags. |
| BYTE or SHORT | xCoordinates[ ] | First coordinates relative to (0,0); others are relative to previous point. |
| BYTE or SHORT | yCoordinates[ ] | First coordinates relative to (0,0); others are relative to previous point. |
Each flag is a single byte. Their meanings are shown below.
| Flags | Bit | 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, not 2. |
| y-Short Vector | 2 | If set, the corresponding y-coordinate is 1 byte long, not 2. |
| 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 two meanings, depending on how the x-Short Vector flag is set. If x-Short Vector is set, this bit describes the sign of the value, with 1 equalling positive and 0 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 also not set, the current x-coordinate is a signed 16-bit delta vector. | /tr>
| This y is same (Positive y-Short Vector) | 5 | This flag has two meanings, depending on how the y-Short Vector flag is set. If y-Short Vector is set, this bit describes the sign of the value, with 1 equalling positive and 0 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. If the y-Short Vector bit is not set and this bit is also not set, the current y-coordinate is a signed 16-bit delta vector. |
| Reserved | 6 | This bit is reserved. Set it to zero. |
| Reserved | 7 | This bit is reserved. Set it to zero. |
| Field Summary | |
|---|---|
static byte |
ONCURVE
Flag: ONCURVE |
protected TtfTableGLYF |
parentTable
parent table |
static byte |
REPEAT
Flag: REPEAT |
static byte |
XDUAL
Flag: XDUAL |
static byte |
XSHORTVECTOR
Flag: XSHORTVECTOR |
static byte |
YDUAL
Flag: YDUAL |
static byte |
YSHORTVECTOR
Flag: YSHORTVECTOR |
| Constructor Summary | |
|---|---|
protected |
TtfTableGLYF.Descript(TtfTableGLYF parentTable,
short numberOfContours,
java.io.ByteArrayInputStream bais)
Create a new object. |
| Method Summary | |
|---|---|
short[] |
getInstructions()
Returns the instructions |
int |
getNumberOfContours()
Returns the number of contours. |
short |
getXMax()
Returns the x max. |
short |
getXMin()
Returns the x min. |
short |
getYMax()
Returns the y max. |
short |
getYMin()
Returns the y min. |
protected void |
readInstructions(java.io.ByteArrayInputStream bais,
int count)
Read the instructions |
protected void |
readInstructions(RandomAccessR rar,
int count)
Read the instructions |
void |
writeXML(XMLStreamWriter writer)
Write the data to a XMLStreamWriter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte ONCURVE
public static final byte REPEAT
public static final byte XDUAL
public static final byte XSHORTVECTOR
public static final byte YDUAL
public static final byte YSHORTVECTOR
protected TtfTableGLYF parentTable
| Constructor Detail |
|---|
protected TtfTableGLYF.Descript(TtfTableGLYF parentTable,
short numberOfContours,
java.io.ByteArrayInputStream bais)
parentTable - the parent tablenumberOfContours - number of conttoursbais - the basis| Method Detail |
|---|
public short[] getInstructions()
public int getNumberOfContours()
public short getXMax()
public short getXMin()
public short getYMax()
public short getYMin()
protected void readInstructions(java.io.ByteArrayInputStream bais,
int count)
bais - inputcount - count
protected void readInstructions(RandomAccessR rar,
int count)
throws java.io.IOException
rar - inputcount - count
java.io.IOException - if an IO-error occurs
public void writeXML(XMLStreamWriter writer)
throws java.io.IOException
writeXML in interface XMLWriterConvertiblewriter - the XML-Writer
java.io.IOException - if an IO-error occurs.XMLWriterConvertible.writeXML(
org.extex.util.xml.XMLStreamWriter)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||