📄 gsub.htm
字号:
<TR><TD VALIGN=TOP>00C0</TD><TD VALIGN=TOP>192</TD><TD>DeltaGlyphID = 192, add to each input glyph index to produce output glyph index<HR></TD></TR>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP><STRONG>CoverageFormat2</STRONG><BR>LiningNumeralCoverage</TD><TD VALIGN=BOTTOM>Coverage table definition</TD></TR>
<TR><TD VALIGN=TOP>0002</TD><TD VALIGN=TOP>2</TD><TD>CoverageFormat, ranges</TD></TR>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP>1</TD><TD>RangeCount<BR>RangeRecord[0]</TD></TR>
<TR><TD VALIGN=TOP>004E</TD><TD VALIGN=TOP>78</TD><TD>Start GlyphID for numeral zero glyph</TD></TR>
<TR><TD VALIGN=TOP>0058</TD><TD VALIGN=TOP>87</TD><TD>End GlyphID for numeral nine glyph</TD></TR>
<TR><TD VALIGN=TOP>0000</TD><TD VALIGN=TOP>0</TD><TD>StartCoverageIndex first CoverageIndex = 0</TD></TR>
</TABLE>
<A NAME=EX3><H4>Example 3: SingleSubstFormat2 Subtable</H4></A>
<P>Example 3 uses the <A HREF="#SSF2">SingleSubstFormat2 subtable</A> for lists to substitute punctuation glyphs in Japanese text that is written vertically. Horizontally oriented parentheses and square brackets (the input glyphs) are replaced with vertically oriented parentheses and square brackets (the output glyphs).
<P>The Coverage table, Format 1, identifies each input glyph index. The number of input glyph indices listed in the Coverage table matches the number of output glyph indices listed in the subtable. For correct substitution, the order of the glyph indices in the Coverage table (input glyphs) must match the order in the Substitute array (output glyphs).
<BR> <BR><FONT SIZE=5>Example 3</FONT>
<TABLE BGCOLOR="#F0F0F0" WIDTH=480 BORDER=0 CELLPADDING=3>
<THEAD>
<TR><TH BGCOLOR="#C0C0C0">Hex Data</TH><TH BGCOLOR="#C0C0C0">Source</TH><TH BGCOLOR="#C0C0C0">Comments</TH></TR>
</THEAD>
<TBODY>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP><STRONG>SingleSubstFormat2</STRONG><BR>VerticalPunctuationSubtable</TD><TD VALIGN=BOTTOM>SingleSubst subtable definition</TD></TR>
<TR><TD VALIGN=TOP>0002</TD><TD VALIGN=TOP>2</TD><TD>SubstFormat lists</TD></TR>
<TR><TD VALIGN=TOP>000E</TD><TD VALIGN=TOP>VerticalPunctuationCoverage</TD><TD>offset to Coverage table</TD></TR>
<TR><TD VALIGN=TOP>0004</TD><TD VALIGN=TOP>4</TD><TD>GlyphCount, equals GlyphCount in Coverage table</TD></TR>
<TR><TD VALIGN=TOP>0131</TD><TD VALIGN=TOP>VerticalOpenBracketGlyph</TD><TD>Substitute[0], ordered by Coverage Index</TD></TR>
<TR><TD VALIGN=TOP>0135</TD><TD VALIGN=TOP>VerticalClosedBracketGlyph</TD><TD>Substitute[1]</TD></TR>
<TR><TD VALIGN=TOP>013E</TD><TD VALIGN=TOP>VerticalOpenParenthesisGlyph</TD><TD>Substitute[2]</TD></TR>
<TR><TD VALIGN=TOP>0143</TD><TD VALIGN=TOP>VerticalClosedParenthesisGlyph</TD><TD>Substitute[3]<HR></TD></TR>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP><STRONG>CoverageFormat1</STRONG><BR>VerticalPunctuationCoverage</TD><TD VALIGN=BOTTOM>Coverage table definition</TD></TR>
<TR><TD VALIGN=TOP>0001</TD><TD VALIGN=TOP>1</TD><TD>CoverageFormat lists</TD></TR>
<TR><TD VALIGN=TOP>0004</TD><TD VALIGN=TOP>4</TD><TD>GlyphCount</TD></TR>
<TR><TD VALIGN=TOP>003C</TD><TD VALIGN=TOP>HorizontalOpenBracketGlyph</TD><TD>GlyphArray[0], ordered by GlyphID</TD></TR>
<TR><TD VALIGN=TOP>0040</TD><TD VALIGN=TOP>HorizontalClosedBracketGlyph</TD><TD>GlyphArray[1]</TD></TR>
<TR><TD VALIGN=TOP>004B</TD><TD VALIGN=TOP>HorizontalOpenParenthesisGlyph</TD><TD>GlyphArray[2]</TD></TR>
<TR><TD VALIGN=TOP>004F</TD><TD VALIGN=TOP>HorizontalClosedParenthesisGlyph</TD><TD>GlyphArray[3]</TD></TR>
</TABLE>
<A NAME=EX4><H4>Example 4: MultipleSubstFormat1 Subtable</H4></A>
<P>Example 4 uses a <A HREF="#MSF1">MultipleSubstFormat1 subtable</A> to replace a single "ffi" ligature with three individual glyphs that form the string <ffi>. The subtable defines a format identifier of 1, an offset to a Coverage table that specifies the glyph index of the "ffi" ligature (the input glyph), an offset to a Sequence table that specifies the sequence of glyph indices for the <ffi> string in its substitute array (the output glyph sequence), and a count of Sequence table offsets.
<BR> <BR><FONT SIZE=5>Example 4</FONT>
<TABLE BGCOLOR="#F0F0F0" WIDTH=480 BORDER=0 CELLPADDING=3>
<THEAD>
<TR><TH BGCOLOR="#C0C0C0">Hex Data</TH><TH BGCOLOR="#C0C0C0">Source</TH><TH BGCOLOR="#C0C0C0">Comments</TH></TR>
</THEAD>
<TBODY>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP><STRONG>MultipleSubstFormat1</STRONG><BR>FfiDecompSubtable</TD><TD VALIGN=BOTTOM>MultipleSubst subtable definition</TD></TR>
<TR><TD VALIGN=TOP>0001</TD><TD VALIGN=TOP>1</TD><TD>SubstFormat</TD></TR>
<TR><TD VALIGN=TOP>0008</TD><TD VALIGN=TOP>FfiDecompCoverage</TD><TD>offset to Coverage table</TD></TR>
<TR><TD VALIGN=TOP>0001</TD><TD VALIGN=TOP>1</TD><TD>SequenceCount, equals GlyphCount in Coverage table</TD></TR>
<TR><TD VALIGN=TOP>000E</TD><TD VALIGN=TOP>FfiDecompSequence</TD><TD>offset to Sequence[0] table<HR></TD></TR>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP><STRONG>CoverageFormat1</STRONG><BR>FfiDecompCoverage</TD><TD VALIGN=BOTTOM>Coverage table definition</TD></TR>
<TR><TD VALIGN=TOP>0001</TD><TD VALIGN=TOP>1</TD><TD>CoverageFormat lists</TD></TR>
<TR><TD VALIGN=TOP>0001</TD><TD VALIGN=TOP>1</TD><TD>GlyphCount</TD></TR>
<TR><TD VALIGN=TOP>00F1</TD><TD VALIGN=TOP>ffiGlyphID</TD><TD>ligature glyph<HR></TD></TR>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP><STRONG>Sequence</STRONG><BR>FfiDecompSequence</TD><TD VALIGN=BOTTOM>Sequence table definition</TD></TR>
<TR><TD VALIGN=TOP>0003</TD><TD VALIGN=TOP>3</TD><TD>GlyphCount</TD></TR>
<TR><TD VALIGN=TOP>001A</TD><TD VALIGN=TOP>fGlyphID</TD><TD>first glyph in sequence order</TD></TR>
<TR><TD VALIGN=TOP>001A</TD><TD VALIGN=TOP>fGlyphID</TD><TD>second glyph</TD></TR>
<TR><TD VALIGN=TOP>001D</TD><TD VALIGN=TOP>iGlyphID</TD><TD>third glyph</TD></TR>
</TABLE>
<A NAME=EX5><H4>Example 5: AlternateSubstFormat 1 Subtable</H4></A>
<P>Example 5 uses the <A HREF="#ASF1">AlternateSubstFormat1 subtable</A> to replace the default ampersand glyph (input glyph) with one of two alternative ampersand glyphs (output glyph).
<P>In this case, the Coverage table specifies the index of a single glyph, the default ampersand, because it is the only glyph covered by this lookup. The AlternateSet table for this covered glyph identifies the alternative glyphs: AltAmpersand1GlyphID and AltAmpersand2GlyphID.
<P>In Example 5, the index position of the AlternateSet table offset in the AlternateSet array is zero (0), which correlates with the index position (also zero) of the default ampersand glyph in the Coverage table.
<BR> <BR><FONT SIZE=5>Example 5</FONT>
<TABLE BGCOLOR="#F0F0F0" WIDTH=480 BORDER=0 CELLPADDING=3>
<THEAD>
<TR><TH BGCOLOR="#C0C0C0">Hex Data</TH><TH BGCOLOR="#C0C0C0">Source</TH><TH BGCOLOR="#C0C0C0">Comments</TH></TR>
</THEAD>
<TBODY>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP><STRONG>AlternateSubstFormat1</STRONG><BR>AltAmpersandSubtable</TD><TD VALIGN=BOTTOM>AlternateSubstFormat1 subtable definition</TD></TR>
<TR><TD VALIGN=TOP>0001</TD><TD VALIGN=TOP>1</TD><TD>SubstFormat</TD></TR>
<TR><TD VALIGN=TOP>0008</TD><TD VALIGN=TOP>AltAmpersandCoverage</TD><TD>offset to Coverage table</TD></TR>
<TR><TD VALIGN=TOP>0001</TD><TD VALIGN=TOP>1</TD><TD>AlternateSetCnt, equals GlyphCount in Coverage table</TD></TR>
<TR><TD VALIGN=TOP>000E</TD><TD VALIGN=TOP>AltAmpersandSet</TD><TD>offset to AlternateSet[0] table<HR></TD></TR>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP><STRONG>CoverageFormat1</STRONG><BR>AltAmpersandCoverage</TD><TD VALIGN=BOTTOM>Coverage table definition</TD></TR>
<TR><TD VALIGN=TOP>0001</TD><TD VALIGN=TOP>1</TD><TD>CoverageFormat</TD></TR>
<TR><TD VALIGN=TOP>0001</TD><TD VALIGN=TOP>1</TD><TD>GlyphCount</TD></TR>
<TR><TD VALIGN=TOP>003A</TD><TD VALIGN=TOP>DefaultAmpersandGlyphID</TD><TD>GlyphArray[0]<HR></TD></TR>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP><STRONG>AlternateSet</STRONG><BR>AltAmpersandSet</TD><TD VALIGN=BOTTOM>AlternateSet table definition</TD></TR>
<TR><TD VALIGN=TOP>0002</TD><TD VALIGN=TOP>2</TD><TD>GlyphCount</TD></TR>
<TR><TD VALIGN=TOP>00C9</TD><TD VALIGN=TOP>AltAmpersand1GlyphID</TD><TD>offset to Alternate[0], in arbitrary order</TD></TR>
<TR><TD VALIGN=TOP>00CA</TD><TD VALIGN=TOP>AltAmpersand2GlyphID</TD><TD>offset to Alternate[1]</TD></TR>
</TABLE>
<A NAME=EX6><H4>Example 6: LigatureSubstFormat1 Subtable</H4></A>
<P>Example 6 shows a <A HREF="#LSF1">LigatureSubstFormat1 subtable</A> that defines data to replace a string of glyphs with a single ligature glyph. Because a LigatureSubstFormat1 subtable can specify glyph substitutions for more than one ligature, this subtable defines three ligatures: "etc," "ffi," and "fi."
<P>The sample subtable contains a format identifier (4) and an offset to a Coverage table. The Coverage table, which lists an index for each first glyph in the ligatures, lists indices for the "e" and "f" glyphs. The Coverage table range format is used here because the "e" and "f" glyph indices are numbered consecutively.
<P>In the LigatureSubst subtable, LigSetCount specifies two LigatureSet tables, one for each covered glyph, and the LigatureSet array stores offsets to them. In this array, the "e" LigatureSet precedes the "f" LigatureSet, matching the order of the corresponding first-glyph components in the Coverage table.
<P>Each LigatureSet table identifies all ligatures that begin with a covered glyph. The sample LigatureSet table defined for the "e" glyph contains only one ligature, "etc." A LigatureSet table defined for the "f" glyph contains two ligatures, "ffi" and "fi."
<P>The sample FLigaturesSet table has offsets to two Ligature tables, one for "ffi" and one for "fi." The Ligature array lists the "ffi" Ligature table first to indicate that the "ffi" ligature is preferred to the "fi" ligature.
<BR> <BR><FONT SIZE=5>Example 6</FONT>
<TABLE BGCOLOR="#F0F0F0" WIDTH=480 BORDER=0 CELLPADDING=3>
<THEAD>
<TR><TH BGCOLOR="#C0C0C0">Hex Data</TH><TH BGCOLOR="#C0C0C0">Source</TH><TH BGCOLOR="#C0C0C0">Comments</TH></TR>
</THEAD>
<TBODY>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP><STRONG>LigatureSubstFormat1</STRONG><BR>LigaturesSubtable</TD><TD VALIGN=BOTTOM>LigatureSubstFormat1 subtable
definition</TD></TR>
<TR><TD VALIGN=TOP>0001</TD><TD VALIGN=TOP>1</TD><TD>SubstFormat</TD></TR>
<TR><TD VALIGN=TOP>000A</TD><TD VALIGN=TOP>LigaturesCoverage</TD><TD>offset to Coverage table</TD></TR>
<TR><TD VALIGN=TOP>0002</TD><TD VALIGN=TOP>2</TD><TD>LigSetCount</TD></TR>
<TR><TD VALIGN=TOP>0014</TD><TD VALIGN=TOP>ELigaturesSet</TD><TD>offset to LigatureSet[0] table in Coverage Index order</TD></TR>
<TR><TD VALIGN=TOP>0020</TD><TD VALIGN=TOP>FLigaturesSet</TD><TD>offset to LigatureSet[1] table<HR></TD></TR>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP><STRONG>CoverageFormat2</STRONG><BR>LigaturesCoverage</TD><TD VALIGN=BOTTOM>Coverage table definition</TD></TR>
<TR><TD VALIGN=TOP>0002</TD><TD VALIGN=TOP>2</TD><TD>CoverageFormat, ranges</TD></TR>
<TR><TD VALIGN=TOP>0001</TD><TD VALIGN=TOP>1</TD><TD>RangeCount<BR>RangeRecord[0]</TD></TR>
<TR><TD VALIGN=TOP>0019</TD><TD VALIGN=TOP>eGlyphID</TD><TD>Start, first GlyphID</TD></TR>
<TR><TD VALIGN=TOP>001A</TD><TD VALIGN=TOP>fGlyphID</TD><TD>End, last GlyphID in range</TD></TR>
<TR><TD VALIGN=TOP>0000</TD><TD VALIGN=TOP>0</TD><TD>StartCoverageIndex, coverage index of start glyphID<HR></TD></TR>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP><STRONG>LigatureSet</STRONG><BR>ELigaturesSet</TD><TD>LigatureSet table definition<BR>all ligatures that start with e</TD></TR>
<TR><TD VALIGN=TOP>0001</TD><TD VALIGN=TOP>1</TD><TD>LigatureCount</TD></TR>
<TR><TD VALIGN=TOP>0004</TD><TD VALIGN=TOP>etcLigature</TD><TD>offset to Ligature[0] table<HR></TD></TR>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP><STRONG>Ligature</STRONG><BR>etcLigature</TD><TD VALIGN=BOTTOM>Ligature table definition</TD></TR>
<TR><TD VALIGN=TOP>015B</TD><TD VALIGN=TOP>etcGlyphID</TD><TD>LigGlyph, output GlyphID</TD></TR>
<TR><TD VALIGN=TOP>0003</TD><TD VALIGN=TOP>3</TD><TD>CompCount number of components</TD></TR>
<TR><TD VALIGN=TOP>0028</TD><TD VALIGN=TOP>tGlyphID</TD><TD>Component[1], second component in ligature</TD></TR>
<TR><TD VALIGN=TOP>0017</TD><TD VALIGN=TOP>cGlyphID</TD><TD>Component[2], third component in ligature<HR></TD></TR>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP><STRONG>LigatureSet</STRONG><BR>FLigaturesSet</TD><TD VALIGN=TOP>LigatureSet table definition all ligatures start with f</TD></TR>
<TR><TD VALIGN=TOP>0002</TD><TD VALIGN=TOP>2</TD><TD>LigatureCount</TD></TR>
<TR><TD VALIGN=TOP>0006</TD><TD VALIGN=TOP>ffiLigature</TD><TD>offset to Ligature[0] table, listed first because ffi ligature is preferred to
fi ligature</TD></TR>
<TR><TD VALIGN=TOP>000E</TD><TD VALIGN=TOP>fiLigature</TD><TD>offset to Ligature[1] table<HR></TD></TR>
<TR><TD VALIGN=TOP> </TD><TD VALIGN=TOP><STRONG>Ligature</STRONG><BR>ffiLigature</TD><TD VALIGN=BOTTOM>Ligature table definition<HR></TD></TR>
<TR><TD VALIGN=TOP>00F1</TD><TD VALIGN=TOP>ffiGlyphID</TD><TD>LigGlyph, output GlyphID</TD></TR>
<TR><TD VALIGN=TOP>0003</TD><TD VALIGN=TOP>3</TD><TD>CompCount</TD></TR>
<TR><TD VALIGN=TOP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -