|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.font.format.xtf.tables.gps.ValueRecord
public class ValueRecord
Class for a ValueRecord.
GPOS subtables use ValueRecords to describe all the variables and values used to adjust the position of a glyph or set of glyphs. A ValueRecord may define any combination of X and Y values (in design units) to add to (positive values) or subtract from (negative values) the placement and advance values provided in the font. A ValueRecord also may contain an offset to a Device table for each of the specified values. If a ValueRecord specifies more than one value, the values should be listed in the order shown in the ValueRecord definition.
The text-processing client must be aware of the flexible and multi-dimensional nature of ValueRecords in the GPOS table. Because the GPOS table uses ValueRecords for many purposes, the sizes and contents of ValueRecords may vary from subtable to subtable.
ValueRecord (all fields are optional)
| Value | Type | Description |
| int16 | XPlacement | Horizontal adjustment for placement-in design units |
| int16 | YPlacement | Vertical adjustment for placement-in design units |
| int16 | XAdvance | Horizontal adjustment for advance-in design units (only used for horizontal writing) |
| int16 | YAdvance | Vertical adjustment for advance-in design units (only used for vertical writing) |
| Offset | XPlaDevice | Offset to Device table for horizontal placement-measured from beginning of PosTable (may be NULL) |
| Offset | YPlaDevice | Offset to Device table for vertical placement-measured from beginning of PosTable (may be NULL) |
| Offset | XAdvDevice | Offset to Device table for horizontal advance-measured from beginning of PosTable (may be NULL) |
| Offset | YAdvDevice | Offset to Device table for vertical advance-measured from beginning of PosTable (may be NULL) |
| Field Summary | |
|---|---|
static int[] |
MASK
The MASK for the ValueFormat. |
static java.lang.String[] |
NAME
The Name for the ValueFormat. |
static int |
Reserved
For future use. |
static int |
XAdvance
Includes horizontal adjustment for advance. |
static int |
XAdvDevice
Includes horizontal Device table for advance. |
static int |
XPlacement
Includes horizontal adjustment for placement. |
static int |
XPlaDevice
Includes horizontal Device table for placement. |
static int |
YAdvance
Includes vertical adjustment for advance. |
static int |
YAdvDevice
Includes vertical Device table for advance. |
static int |
YPlacement
Includes vertical adjustment for placement. |
static int |
YPlaDevice
Includes vertical Device table for placement. |
| Constructor Summary | |
|---|---|
ValueRecord(RandomAccessR rar,
int posOffset,
XtfGlyphName xtfGlyph,
int valueFormat)
Creates a new object. |
|
| Method Summary | |
|---|---|
static int |
getMask(int value)
Returns the mask of the ValueFormat or -1, if not found. |
static int |
getMaskLength()
Returns the length of the mask array. |
static java.lang.String |
getName(int value)
Returns the name of the ValueFormat. |
int |
getValueFormat()
Getter for valueFormat. |
int |
getXAdvance()
Getter for xAdvance. |
DeviceTable |
getXAdvDevice()
Getter for xAdvDevice. |
int |
getXAdvDeviceOffset()
Getter for xAdvDeviceOffset. |
int |
getXPlacement()
Getter for xPlacement. |
DeviceTable |
getXPlaDevice()
Getter for xPlaDevice. |
int |
getXPlaDeviceOffset()
Getter for xPlaDeviceOffset. |
int |
getYAdvance()
Getter for yAdvance. |
int |
getYAdvDevice()
Getter for yAdvDeviceOffset. |
int |
getYPlacement()
Getter for yPlacement. |
DeviceTable |
getYPlaDevice()
Getter for yPlaDevice. |
int |
getYPlaDeviceOffset()
Getter for yPlaDeviceOffset. |
void |
init(RandomAccessR rar,
int posOffset)
Initialize. |
static boolean |
isMaskSet(int value,
int mask)
Check, if the bit for the mask is set. |
boolean |
isXAdvance()
Getter for isXAdvance. |
boolean |
isXAdvDevice()
Getter for isXAdvDevice. |
boolean |
isXPlacement()
Getter for isXPlacement. |
boolean |
isXPlaDevice()
Getter for isXPlaDevice. |
boolean |
isYAdvance()
Getter for isYAdvance. |
boolean |
isYAdvDevice()
Getter for isYAdvDevice. |
boolean |
isYPlacement()
Getter for isYPlacement. |
boolean |
isYPlaDevice()
Getter for isYPlaDevice. |
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 int[] MASK
public static final java.lang.String[] NAME
public static final int Reserved
public static final int XAdvance
public static final int XAdvDevice
public static final int XPlacement
public static final int XPlaDevice
public static final int YAdvance
public static final int YAdvDevice
public static final int YPlacement
public static final int YPlaDevice
| Constructor Detail |
|---|
public ValueRecord(RandomAccessR rar,
int posOffset,
XtfGlyphName xtfGlyph,
int valueFormat)
throws java.io.IOException
rar - The input.posOffset - The offset of the pos table.xtfGlyph - The glyph name.valueFormat - The ValueFormat.
java.io.IOException - if a io-error occurred.| Method Detail |
|---|
public static int getMask(int value)
value - The value.
public static int getMaskLength()
public static java.lang.String getName(int value)
value - The value.
public static boolean isMaskSet(int value,
int mask)
value - The value.mask - The mask.
true, if the bit for the mask is set,
otherwise false.public int getValueFormat()
public int getXAdvance()
public DeviceTable getXAdvDevice()
public int getXAdvDeviceOffset()
public int getXPlacement()
public DeviceTable getXPlaDevice()
public int getXPlaDeviceOffset()
public int getYAdvance()
public int getYAdvDevice()
public int getYPlacement()
public DeviceTable getYPlaDevice()
public int getYPlaDeviceOffset()
public void init(RandomAccessR rar,
int posOffset)
throws java.io.IOException
Read the DeviceTable
rar - The input.posOffset - The offset of the pos table.
java.io.IOException - if a IO-error occurred.public boolean isXAdvance()
public boolean isXAdvDevice()
public boolean isXPlacement()
public boolean isXPlaDevice()
public boolean isYAdvance()
public boolean isYAdvDevice()
public boolean isYPlacement()
public boolean isYPlaDevice()
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 | |||||||||