|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.font.format.xtf.tables.AbstractXtfTable
org.extex.font.format.xtf.tables.TtfTableGASP
public class TtfTableGASP
The table 'gasp'.
This table contains information which describes the preferred rasterization techniques for the typeface when it is rendered on grayscale-capable devices. This table also has some use for monochrome devices, which may use the table to turn off hinting at very large or small sizes, to improve performance.
| Type | Name | Description |
| USHORT | version | Version number (set to 0) |
| USHORT | numRanges | Number of records to follow |
| GASPRANGE | gaspRange[numRanges] | Sorted by ppem |
GASPRANGE
| Type | Name | Description |
| USHORT | rangeMaxPPEM | Upper limit of range, in PPEM |
| USHORT | rangeGaspBehavior | Flags describing desired rasterizer behavior. |
There are two flags for the rangeGaspBehavior flags:
| Flag | Meaning |
| GASP_GRIDFIT | Use gridfitting |
| GASP_DOGRAY | Use grayscale rendering |
The four currently defined values of rangeGaspBehavior would have the following uses:
| Flag | Value | Meaning |
| GASP_DOGRAY | 0x0002 | small sizes, typically ppem<9 |
| GASP_GRIDFIT | 0x0001 | medium sizes, typically 9<=ppem<=16 |
| GASP_DOGRAY|GASP_GRIDFIT | 0x0003 | large sizes, typically ppem>16 |
| (neither) | 0x0000 | optional for very large sizes, typically ppem>2048 |
The records in the gaspRange[] array must be sorted in order of increasing rangeMaxPPEM value. The last record should use 0xFFFF as a sentinel value for rangeMaxPPEM and should describe the behavior desired at all sizes larger than the previous record's upper limit. If the only entry in 'gasp' is the 0xFFFF sentinel value, the behavior described will be used for all sizes.
| Nested Class Summary | |
|---|---|
class |
TtfTableGASP.GaspRange
GaspRange |
| Field Summary | |
|---|---|
static int |
GASP_DOGRAY
GASP_DOGRAY |
static int |
GASP_DOGRAY_GRIDFIT
GASP_DOGRAY_GRIDFIT |
static int |
GASP_GRIDFIT
GASP_GRIDFIT |
static int |
GASP_NONE
GASP_NONE |
| Constructor Summary | |
|---|---|
TtfTableGASP(XtfTableMap tablemap,
XtfTableDirectory.Entry de,
RandomAccessR rar)
Create a new object |
|
| Method Summary | |
|---|---|
TtfTableGASP.GaspRange[] |
getGaspRange()
Returns the gaspRange. |
int |
getNumRanges()
Returns the numRanges. |
java.lang.String |
getShortcut()
Returns the table shortcut. |
int |
getType()
Get the table type, as a table directory value. |
int |
getVersion()
Returns the version. |
void |
writeXML(XMLStreamWriter writer)
Write the data to a XMLStreamWriter. |
| Methods inherited from class org.extex.font.format.xtf.tables.AbstractXtfTable |
|---|
getGlyphName, getInitOrder, getTableMap, init, writeStartElement |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.extex.font.format.xtf.tables.XtfTable |
|---|
getInitOrder, getTableMap, init |
| Field Detail |
|---|
public static final int GASP_DOGRAY
public static final int GASP_DOGRAY_GRIDFIT
public static final int GASP_GRIDFIT
public static final int GASP_NONE
| Constructor Detail |
|---|
public TtfTableGASP(XtfTableMap tablemap,
XtfTableDirectory.Entry de,
RandomAccessR rar)
throws java.io.IOException
tablemap - the table mapde - entryrar - input
java.io.IOException - if an IO-error occurs| Method Detail |
|---|
public TtfTableGASP.GaspRange[] getGaspRange()
public int getNumRanges()
public java.lang.String getShortcut()
getShortcut in interface XtfTableXtfTable.getShortcut()public int getType()
getType in interface XtfTablepublic int getVersion()
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 | |||||||||