📄 jstf.htm
字号:
<BR> <BR><FONT SIZE=5>ExtenderGlyph 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>GlyphCount</TD><TD>Number of Extender Glyphs in this script</TD></TR>
<TR><TD VALIGN=TOP>GlyphID</TD><TD VALIGN=TOP>ExtenderGlyph[GlyphCount]</TD><TD>GlyphIDs-in increasing numerical order</TD></TR>
</TABLE>
<H3>Justification Language System Table</H3>
<P>The Justification Language System (JstfLangSys) table contains an array of justification suggestions, ordered by priority. A text-processing client doing justification should begin with the suggestion that has a zero (0) priority, and then-as necessary-apply suggestions of increasing priority until the text is justified.
<P>The font developer defines the number and the meaning of the priority levels. Each priority level stands alone; its suggestions are not added to the previous levels.
The JstfLangSys table consists of a count of the number of priority levels (JstfPriorityCnt) and an array of offsets to Justification Priority tables (JstfPriority), stored in priority order.
Example 2 at the end of the chapter shows how to define a JstfLangSys table.
<BR> <BR><FONT SIZE=5>JstfLangSys 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>JstfPriorityCnt</TD><TD>Number of JstfPriority tables</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>JstfPriority[JstfPriorityCnt]</TD><TD>Array of offsets to JstfPriority tables-from beginning of JstfLangSys table-in priority order</TD></TR>
</TABLE>
<H3>Justification Priority Table</H3>
<P>A Justification Priority (JstfPriority) table defines justification suggestions for a single priority level. Each priority level specifies whether to enable or disable GSUB and GPOS lookups or apply text justification lookups to shrink and extend lines of text.
<P>JstfPriority has offsets to four tables with line shrinkage data: two are JstfGSUBModList tables for enabling and disabling glyph substitution lookups, and two are JstfGPOSModList tables for enabling and disabling glyph positioning lookups. Offsets to JstfGSUBModList and JstfGPOSModList tables also are defined for line extension.
<P>Example 3 at the end of this chapter demonstrates two JstfPriority tables for two justification suggestions.
<BR> <BR><FONT SIZE=5>JstfPriority 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>Offset</TD><TD VALIGN=TOP>ShrinkageEnableGSUB</TD><TD>Offset to Shrinkage Enable JstfGSUBModList table-from beginning of JstfPriority table-may be NULL</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>ShrinkageDisableGSUB</TD><TD>Offset to Shrinkage Disable JstfGSUBModList table-from beginning of JstfPriority table-may be NULL</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>ShrinkageEnableGPOS</TD><TD>Offset to Shrinkage Enable JstfGPOSModList table-from beginning of JstfPriority table-may be NULL</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>ShrinkageDisableGPOS</TD><TD>Offset to Shrinkage Disable JstfGPOSModList table-from beginning of JstfPriority table-may be NULL</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>ShrinkageJstfMax</TD><TD>Offset to Shrinkage JstfMax table-from beginning of JstfPriority table
-may be NULL</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>ExtensionEnableGSUB</TD><TD>Offset to Extension Enable JstfGSUBModList table-may be NULL</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>ExtensionDisableGSUB</TD><TD>Offset to Extension Disable JstfGSUBModList table-from beginning of JstfPriority table-may be NULL</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>ExtensionEnableGPOS</TD><TD>Offset to Extension Enable JstfGSUBModList table-may be NULL</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>ExtensionDisableGPOS</TD><TD>Offset to Extension Disable JstfGSUBModList table-from beginning of JstfPriority table-may be NULL</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>ExtensionJstfMax</TD><TD>Offset to Extension JstfMax table-from beginning of JstfPriority table
-may be NULL</TD></TR>
</TABLE>
<H3>Justification Modification List Tables</H3>
<P>The Justification Modification List tables (JstfGSUBModList and JstfGPOSModList) contain lists of indices into the lookup lists of either the GSUB or GPOS tables. The client can enable or disable the lookups to justify text. For example, to increase line length, the client might disable a GSUB ligature substitution.
<P>Each JstfModList table consists of a count of Lookups (LookupCount) and an array of lookup indices (LookupIndex).
<P>To justify a line of text, a text-processing client enables or disables the specified lookups in a JstfModList table, reassembles the lookups in the LookupList order, and applies them to each glyph in the string one after another.
<BLOCKQUOTE>
<STRONG>Note:</STRONG> If any JSTF suggestion at any priority level modifies a GSUB or GPOS lookup previously applied to the glyph string, then the text-processing client must apply the JSTF suggestion to an unmodified version of the glyph string.
</BLOCKQUOTE>
<P>Example 3 at the end of this chapter shows JstfGSUBModList and JstfGPOSModList tables with data for shrinking and extending text line lengths.
<BR> <BR><FONT SIZE=5>JstfGSUBModList 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>LookupCount</TD><TD>Number of lookups for this modification</TD></TR>
<TR><TD VALIGN=TOP>uint16</TD><TD VALIGN=TOP>GSUBLookupIndex[LookupCount]</TD><TD>Array of LookupIndex identifiers in GSUB-in increasing numerical order</TD></TR>
</TABLE>
<BR> <BR><FONT SIZE=5>JstfGPOSModList 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>LookupCount</TD><TD>Number of lookups for this modification</TD></TR>
<TR><TD VALIGN=TOP>uint16</TD><TD VALIGN=TOP>GPOSLookupIndex[LookupCount]</TD><TD>Array of LookupIndex identifiers in GPOS-in increasing numerical order</TD></TR>
</TABLE>
<H3>Justification Maximum Table</H3>
<P>A Justification Maximum table (JstfMax) consists of an array of offsets to justification lookups (Lookup) and a count of the defined lookups (Lookup). JstfMax lookups typically are located after the JstfMax table in the font definition.
<P>JstfMax tables have the same format as lookup tables and subtables in the GPOS table, but the JstfMax lookups reside in the JSTF table and contain justification data only. The lookup data might specify a single adjustment value for positioning all glyphs in the script, or it might specify more elaborate adjustments, such as different values for different glyphs or special values for specific pairs of glyphs.
<BLOCKQUOTE>
<STRONG>Note:</STRONG> All GPOS lookup types except contextual positioning lookups may be defined in a JstfMax table.
</BLOCKQUOTE>
<P>JstfMax lookup values are defined in GPOS ValueRecords and may be specified for any advance or placement position, whether horizontal or vertical. These values define the maximum shrinkage or extension allowed per glyph. To justify text, a text-processing client may choose to adjust a glyph's positioning by any amount from zero (0) to the specified maximum.
<P>Example 4 at the end of this chapter shows a JstfMax table. It defines a justification lookup to change the size of the word space glyph to extend line lengths.
<BR> <BR><FONT SIZE=5>JstfMax 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>LookupCount</TD><TD>Number of lookup Indices for this modification</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>Lookup[LookupCount]</TD><TD>Array of offsets to GPOS-type lookup tables-from beginning of JstfMax table-in design order</TD></TR>
</TABLE>
<H3>JSTF Table Examples</H3>
<P>The rest of this chapter describes examples of all the JSTF table formats. All the examples reflect unique parameters described below, but the samples provide a useful reference for building tables specific to other situations.
<P>The examples have three columns showing hex data, source, and comments.
<H4>Example 1: JSTF Header Table and JstfScriptRecord</H4>
<P>Example 1 demonstrates how a script is defined in the JSTF Header with a JstfScriptRecord that identifies the script and references its JstfScript table.
<BR> <BR><FONT SIZE=5>Example 1</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>JSTFHeader</STRONG><BR>TheJSTFHeader</TD><TD VALIGN=BOTTOM>JSTFHeader table definition</TD></TR>
<TR><TD VALIGN=TOP>00010000</TD><TD VALIGN=TOP>0x00010000</TD><TD>version</TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -