📄 gpos.htm
字号:
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>MarkArray</TD><TD>Offset to MarkArray table-from beginning of MarkBasePos subtable</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>BaseArray</TD><TD>Offset to BaseArray table-from beginning of MarkBasePos subtable</TD></TR>
</TABLE>
<P>The BaseArray table consists of an array (BaseRecord) and count (BaseCount) of BaseRecords. The array stores the BaseRecords in the same order as the BaseCoverage Index. Each base glyph in the BaseCoverage table has a BaseRecord.
<BR> <BR><FONT SIZE=5>BaseArray table</FONT>
<TABLE BGCOLOR="#F0F0F0" WIDTH=480 BORDER=0 CELLPADDING=3>
<THEAD>
<TR><TH BGCOLOR="#COCOCO">Type</TH><TH BGCOLOR="#COCOCO">Name</TH><TH BGCOLOR="#COCOCO">Description</TH></TR>
</THEAD>
<TBODY>
<TR><TD VALIGN=TOP>uint16</TD><TD VALIGN=TOP>BaseCount</TD><TD>Number of BaseRecords</TD></TR>
<TR><TD VALIGN=TOP>struct</TD><TD VALIGN=TOP>BaseRecord[BaseCount]</TD><TD>Array of BaseRecords-in order of BaseCoverage Index</TD></TR>
</TABLE>
<P>A BaseRecord declares one Anchor table for each mark class (including Class 0) identified in the MarkRecords of the MarkArray. Each Anchor table specifies one attachment point used to attach all the marks in a particular class to the base glyph.
A BaseRecord contains an array of offsets to Anchor tables (BaseAnchor). The zero-based array of offsets defines the entire set of attachment points each base glyph uses to attach marks. The offsets to Anchor tables are ordered by mark class.
<BLOCKQUOTE>
<STRONG>Note:</STRONG> Anchor tables are not tagged with class value identifiers. Instead, the index value of an Anchor table in the array defines the class value represented by the Anchor table.
</BLOCKQUOTE>
<P>Example 7 at the end of this chapter defines mark positioning above and below base glyphs with a MarkBasePosFormat1 subtable.
<BR> <BR><FONT SIZE=5>BaseRecord</FONT>
<TABLE BGCOLOR="#F0F0F0" WIDTH=480 BORDER=0 CELLPADDING=3>
<THEAD>
<TR><TH BGCOLOR="#COCOCO">Type</TH><TH BGCOLOR="#COCOCO">Name</TH><TH BGCOLOR="#COCOCO">Description</TH></TR>
</THEAD>
<TBODY>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>BaseAnchor[ClassCount]</TD><TD>Array of offsets (one per class) to Anchor tables-from beginning of BaseArray table-ordered by class-zero-based</TD></TR>
</TABLE>
<H3>Lookup Type 5:<BR>
MarkToLigature Attachment Positioning Subtable</H3>
<P>The MarkToLigature attachment (MarkLigPos) subtable is used to position combining mark glyphs with respect to ligature base glyphs. With MarkToBase attachment, described previously, a single base glyph defines an attachment point for each class of marks. In contrast, MarkToLigature attachment describes ligature glyphs composed of several components that can each define an attachment point for each class of marks.
<P>As a result, a ligature glyph may have multiple base attachment points for one class of marks. The specific attachment point for a mark is defined by the ligature component that the subtable associates with the mark.
<P>The MarkLigPos subtable can be used to define multiple mark-to-ligature attachments. In the subtable, every mark glyph has an anchor point and is associated with a class of marks. Every ligature glyph specifies a two-dimensional array of data: each component in a ligature defines an array of anchor points, one for each class of marks.
<P>For example, assume two mark classes: all marks positioned above base glyphs (Class 0), and all marks positioned below base glyphs (Class 1). In this case, each component of a base ligature glyph may define two anchor points, one for attaching the mark glyphs listed in Class 0, and one for attaching the mark glyphs listed in Class 1. Alternatively, if the language system does not allow marks on the second component, the first ligature component may define two anchor points, one for each class of marks, and the second ligature component may define no anchor points.
<P>To position a combining mark using a MarkToLigature attachment subtable, the text-processing client must work backward from the mark to the preceding ligature glyph. To correctly access the subtables, the client must keep track of the component associated with the mark. Aligning the attachment points combines the mark and ligature.
<P>The MarkToLigature attachment subtable has one format: MarkLigPosFormat1. The subtable begins with a format identifier (PosFormat) and offsets to two Coverage tables that list all the mark glyphs (MarkCoverage) and Ligature glyphs (LigatureCoverage) referenced in the subtable.
<P>For each glyph in the MarkCoverage table, a MarkRecord specifies its class and an offset to the Anchor table that describes the mark's attachment point. A mark class is identified by a specific integer, called a class value. ClassCount records the total number of distinct mark classes defined in all MarkRecords.
<P>The MarkBasePosFormat1 subtable contains an offset, measured from the beginning of the subtable, to a MarkArray table, which contains all MarkRecords stored in an array (MarkRecord) by MarkCoverage Index. (For details about MarkArrays and MarkRecords, see the end of this chapter.)
<P>The MarkLigPosFormat1 subtable also contains an offset to a LigatureArray table (LigatureArray).
<BR> <BR><FONT SIZE=5>MarkLigPosFormat1 subtable: MarkToLigature attachment</FONT>
<TABLE BGCOLOR="#F0F0F0" WIDTH=480 BORDER=0 CELLPADDING=3>
<THEAD>
<TR><TH BGCOLOR="#COCOCO">Type</TH><TH BGCOLOR="#COCOCO">Name</TH><TH BGCOLOR="#COCOCO">Description</TH></TR>
</THEAD>
<TBODY>
<TR><TD VALIGN=TOP>uint16</TD><TD VALIGN=TOP>PosFormat</TD><TD>Format identifier-format = 1</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>MarkCoverage</TD><TD>Offset to Mark Coverage table-from beginning of MarkLigPos subtable</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>LigatureCoverage</TD><TD>Offset to Ligature Coverage table-from beginning of MarkLigPos subtable</TD></TR>
<TR><TD VALIGN=TOP>uint16</TD><TD VALIGN=TOP>ClassCount</TD><TD>Number of defined mark classes</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>MarkArray</TD><TD>Offset to MarkArray table-from beginning of MarkLigPos subtable</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>LigatureArray</TD><TD>Offset to LigatureArray table-from beginning of MarkLigPos subtable</TD></TR>
</TABLE>
<P>The LigatureArray table contains a count (LigatureCount) and an array of offsets (LigatureAttach) to LigatureAttach tables. The LigatureAttach array lists the offsets to
<P>LigatureAttach tables, one for each ligature glyph listed in the LigatureCoverage table, in the same order as the LigatureCoverage Index.
<BR> <BR><FONT SIZE=5>LigatureArray table</FONT>
<TABLE BGCOLOR="#F0F0F0" WIDTH=480 BORDER=0 CELLPADDING=3>
<THEAD>
<TR><TH BGCOLOR="#COCOCO">Type</TH><TH BGCOLOR="#COCOCO">Name</TH><TH BGCOLOR="#COCOCO">Description</TH></TR>
</THEAD>
<TBODY>
<TR><TD VALIGN=TOP>uint16</TD><TD VALIGN=TOP>LigatureCount</TD><TD>Number of LigatureAttach table offsets</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>LigatureAttach<BR>[LigatureCount]</TD><TD>Array of offsets to LigatureAttach tables-from beginning of LigatureArray table-ordered by LigatureCoverage Index</TD></TR>
</TABLE>
<P>Each LigatureAttach table consists of an array (ComponentRecord) and count (ComponentCount) of the component glyphs in a ligature. The array stores the ComponentRecords in the same order as the components in the ligature. The order of the records also corresponds to the writing direction of the text. For text written left to right, the first component is on the left; for text written right to left, the first component is on the right.
<BR> <BR><FONT SIZE=5>LigatureAttach table</FONT>
<TABLE BGCOLOR="#F0F0F0" WIDTH=480 BORDER=0 CELLPADDING=3>
<THEAD>
<TR><TH BGCOLOR="#C0C0C0">Type</TH><TH BGCOLOR="#C0C0C0">Name</TH><TH BGCOLOR="#C0C0C0">Description</TH></TR>
</THEAD>
<TBODY>
<TR><TD VALIGN=TOP>uint16</TD><TD VALIGN=TOP>ComponentCount</TD><TD>Number of ComponentRecords in this ligature</TD></TR>
<TR><TD VALIGN=TOP>struct</TD><TD VALIGN=TOP>ComponentRecord[ComponentCount]</TD><TD>Array of Component records-ordered by LookupFlag direction bit</TD></TR>
</TABLE>
<P>A ComponentRecord, one for each component in the ligature, contains an array of offsets to the Anchor tables that define all the attachment points used to attach marks to the component (LigatureAnchor). For each mark class (including Class 0) identified in the MarkArray records, an Anchor table specifies the point used to attach all the marks in a particular class to the ligature base glyph, relative to the component.
<P>In a ComponentRecord, the zero-based LigatureAnchor array lists offsets to Anchor tables by mark class. If a component does not define an attachment point for a particular class of marks, then the offset to the corresponding Anchor table will be NULL.
<P>Example 8 at the end of this chapter shows a MarkLisPosFormat1 subtable used to attach mark accents to a ligature glyph in the Arabic script.
<BR> <BR><FONT SIZE=5>ComponentRecord</FONT>
<TABLE BGCOLOR="#F0F0F0" WIDTH=480 BORDER=0 CELLPADDING=3>
<THEAD>
<TR><TH BGCOLOR="#COCOCO">Type</TH><TH BGCOLOR="#COCOCO">Name</TH><TH BGCOLOR="#COCOCO">Description</TH></TR>
</THEAD>
<TBODY>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>LigatureAnchor<BR>[ClassCount]</TD><TD>Array of offsets (one per class) to Anchor tables-from beginning of LigatureAttach table-ordered by class-NULL if a component does not have an attachment for a class-zero-based array</TD></TR>
</TABLE>
<H3>Lookup Type 6:<BR>
MarkToMark Attachment Positioning Subtable</H3>
<P>The MarkToMark attachment (MarkMarkPos) subtable is identical in form to the MarkToBase attachment subtable, although its function is different. MarkToMark attachment defines the position of one mark relative to another mark as when, for example, positioning tone marks with respect to vowel diacritical marks in Vietnamese.
<P>The attaching mark is Mark1, and the base mark being attached to is Mark2. In the MarkMarkPos subtable, every Mark1 glyph has an anchor attachment point and is associated with a class of marks. Each Mark2 glyph defines an anchor point for each class of marks. For example, assume two Mark1 classes: all marks positioned to the left of Mark2 glyphs (Class 0), and all marks positioned to the right of Mark2 glyphs (Class 1). Each Mark2 glyph that uses these marks defines two anchor points: one for attaching the Mark1 glyphs listed in Class 0, and one for attaching the Mark1 glyphs listed in Class 1.
<P>To identify the Mark2 glyph that combines with a Mark1 glyph, the text-processing client must move backward in the glyph string order from the Mark1 glyph to the preceding mark, which becomes Mark2. Aligning the attachment points combines the mark glyphs.
<P>The MarkToMark attachment subtable has one format: MarkMarkPosFormat1. The subtable begins with a format identifier (PosFormat) and offsets to two Coverage tables: one that lists all the Mark1 glyphs referenced in the subtable (Mark1Coverage), and one that lists all the Mark2 glyphs referenced in the subtable (Mark2Coverage).
<P>For each mark glyph in the Mark1Coverage table, a MarkRecord specifies its class and an offset to the Anchor table that describes the mark's attachment point. A mark class is identified by a specific integer, called a class value. (For details about classes, see the chapter, Common Table Formats.) ClassCount specifies the total number of distinct mark classes defined in all the MarkRecords.
<P>The MarkMarkPosFormat1 subtable also contains two offsets, measured from the beginning of the subtable, to two arrays:
<UL>
<LI>The MarkArray table contains all MarkRecords stored by Mark1Coverage Index in an array (MarkRecord). The MarkArray table also contains a count of the number of defined MarkRecords (MarkCount).
<LI>The Mark2Array table consists of an array (Mark2Record) and count (Mark2Count) of Mark2Records.
</UL>
<P>For details about MarkArrays and MarkRecords, see the end of this chapter.
<BR> <BR><FONT SIZE=5>MarkMarkPosFormat1 subtable:<BR> MarkToMark attachment</FONT>
<TABLE BGCOLOR="#F0F0F0" WIDTH=480 BORDER=0 CELLPADDING=3>
<THEAD>
<TR><TH BGCOLOR="#COCOCO">Type</TH><TH BGCOLOR="#COCOCO">Name</TH><TH BGCOLOR="#COCOCO">Description</TH></TR>
</THEAD>
<TBODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -