org.extex.font.format.xtf.tables.gps
Class DeviceTable
java.lang.Object
org.extex.font.format.xtf.tables.gps.DeviceTable
- All Implemented Interfaces:
- XMLWriterConvertible
public class DeviceTable
- extends java.lang.Object
- implements XMLWriterConvertible
Class for a Device Tables.
The DeltaValue array lists the number of pixels to adjust specified points on
the glyph, or the entire glyph, at each ppem size in the targeted range. In
the array, the first index position specifies the number of pixels to add or
subtract from the coordinate at the smallest ppem size that needs correction,
the second index position specifies the number of pixels to add or subtract
from the coordinate at the next ppem size, and so on for each ppem size in
the range.
| Type |
Name |
Description |
| uint16 |
StartSize |
Smallest size to correct-in ppem |
| uint16 |
EndSize |
Largest size to correct-in ppem |
| uint16 |
DeltaFormat |
Format of DeltaValue array data: 1, 2, or 3 |
| uint16 |
DeltaValue[ ] |
Array of compressed data |
DeltaFormat
The 2-, 4-, or 8-bit signed values are packed into uint16's most significant
bits first. For example, using a DeltaFormat of 2 (4-bit values), an array of
values equal to {1, 2, 3, -1} would be represented by the DeltaValue 0x123F.
| Type |
Name |
Description |
| 1 |
2 |
Signed 2-bit value, 8 values per uint16 |
| 2 |
4 |
Signed 4-bit value, 4 values per uint16 |
| 3 |
8 |
Signed 8-bit value, 2 values per uint16 |
- Version:
- $Revision: 6678 $
- Author:
- Michael Niedermair
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeviceTable
public DeviceTable(RandomAccessR rar,
int offset)
throws java.io.IOException
- Creates a new object.
- Parameters:
rar - The input.offset - The offset.
- Throws:
java.io.IOException - if a IO-error occurred.
writeXML
public void writeXML(XMLStreamWriter writer)
throws java.io.IOException
- Write the data to a XMLStreamWriter.
- Specified by:
writeXML in interface XMLWriterConvertible
- Parameters:
writer - the XML-Writer
- Throws:
java.io.IOException - if an IO-error occurs.- See Also:
XMLWriterConvertible.writeXML(org.extex.util.xml.XMLStreamWriter)