|
||||||||||
| 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.gps.AbstractXtfSFLTable
org.extex.font.format.xtf.tables.gps.OtfTableGPOS
public class OtfTableGPOS
Table gpos.
http://partners.adobe.com/public/developer/opentype/index_table_formats2.html
The Glyph Positioning table (GPOS) provides precise control over glyph placement for sophisticated text layout and rendering in each script and language system that a font supports.
Table Organization
The GPOS table begins with a header that defines offsets to a ScriptList, a FeatureList, and a LookupList:
The GPOS table is organized so text processing clients can easily locate the features and lookups that apply to a particular script or language system. To access GPOS information, clients should use the following procedure:
A lookup uses subtables to define the specific conditions, type, and results of a positioning action used to implement a feature. All subtables in a lookup must be of the same LookupType, as listed in the LookupType Enumeration table:
LookupType Enumeration table for glyph positioning
| Value | Type | Description |
| 1 | Single adjustment | Adjust position of a single glyph |
| 2 | Pair adjustment | Adjust position of a pair of glyphs |
| 3 | Cursive attachment | Attach cursive glyphs |
| 4 | MarkToBase attachment | Attach a combining mark to a base glyph |
| 5 | MarkToLigature attachment | Attach a combining mark to a ligature |
| 6 | MarkToMark attachment | Attach a combining mark to another mark |
| 7 | Context positioning | Position one or more glyphs in context |
| 8 | Chained Context positioning | Position one or more glyphs in chained context |
| 9 | Extension positioning | Extension mechanism for other positionings |
| 10+ | Reserved | For future use |
Each LookupType is defined by one or more subtables, whose format depends on the type of positioning operation and the resulting storage efficiency. When glyph information is best presented in more than one format, a single lookup may define more than one subtable, as long as all the subtables are of the same LookupType. For example, within a given lookup, a glyph index array format may best represent one set of target glyphs, whereas a glyph index range format may be better for another set.
A series of positioning operations on the same glyph or string requires multiple lookups, one for each separate action. The values in the ValueRecords are accumulated in these cases. Each lookup is given a different array number in the LookupList table and is applied in the LookupList order.
During text processing, a client applies a lookup to each glyph in the string before moving to the next lookup. A lookup is finished for a glyph after the client locates the target glyph or glyph context and performs a positioning, if specified. To move to the "next" glyph, the client will typically skip all the glyphs that participated in the lookup operation: glyphs that were positioned as well as any other glyphs that formed a context for the operation.
There is just one exception: the "next" glyph in a sequence may be one of those that formed a context for the operation just performed. For example, in the case of pair positioning operations (i.e., kerning), if the position value record for the second glyph is null, that glyph is treated as the "next" glyph in the sequence.
This rest of this chapter describes the GPOS header and the subtables defined for each LookupType. Several GPOS subtables share other tables: ValueRecords, Anchor tables, and MarkArrays. For easy reference, the shared tables are described at the end of this chapter.
GPOS Header
The GPOS table begins with a header that contains a version number (Version) initially set to 1.0 (0x00010000) and offsets to three tables: ScriptList, FeatureList, and LookupList.
| Value | Type | Description |
| Fixed | Version | Version of the GPOS table-initially = 0x00010000 |
| Offset | ScriptList | Offset to ScriptList table-from beginning of GPOS table |
| Offset | FeatureList | Offset to FeatureList table-from beginning of GPOS table |
| Offset | LookupList | Offset to LookupList table-from beginning of GPOS table |
| Field Summary |
|---|
| Fields inherited from class org.extex.font.format.xtf.tables.gps.AbstractXtfSFLTable |
|---|
featureList, lookupList, scriptList |
| Constructor Summary | |
|---|---|
OtfTableGPOS(XtfTableMap tablemap,
XtfTableDirectory.Entry de,
RandomAccessR rar)
Create a new object. |
|
| Method Summary | |
|---|---|
java.lang.String |
getShortcut()
Returns the table shortcut. |
int |
getType()
Get the table type, as a table directory value. |
java.lang.String |
lookupType(int type)
Returns the name of the lookup type (The start index is 1!). |
XtfLookupTable |
read(RandomAccessR rar,
int posOffset,
int type,
int offset,
XtfGlyphName xtfGlyph)
Read the LookupTable or null, if not found. |
| Methods inherited from class org.extex.font.format.xtf.tables.gps.AbstractXtfSFLTable |
|---|
findLangSys, findLookup, findScript, getFeatureList, getFeatureTag, getLookupList, getScriptList, writeXML |
| 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 |
| Methods inherited from interface org.extex.util.xml.XMLWriterConvertible |
|---|
writeXML |
| Constructor Detail |
|---|
public OtfTableGPOS(XtfTableMap tablemap,
XtfTableDirectory.Entry de,
RandomAccessR rar)
throws java.io.IOException
tablemap - the table mapde - directory entryrar - input
java.io.IOException - if an IO-error occurs| Method Detail |
|---|
public java.lang.String getShortcut()
getShortcut in interface XtfTableXtfTable.getShortcut()public int getType()
getType in interface XtfTablepublic java.lang.String lookupType(int type)
lookupType in interface LookupTableFactorytype - The type.
LookupTableFactory.lookupType(int)
public XtfLookupTable read(RandomAccessR rar,
int posOffset,
int type,
int offset,
XtfGlyphName xtfGlyph)
throws java.io.IOException
null, if not found.
Type:
read in interface LookupTableFactoryrar - The input.posOffset - The offset of the pos table (GPOS, GSUB).type - The table type.offset - The offset.xtfGlyph - The glyph name.
java.io.IOException - if a io-error occurred.LookupTableFactory.read(org.extex.util.file.random.RandomAccessR,
int, int, int, org.extex.font.format.xtf.tables.XtfGlyphName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||