📄 ttochap1.htm
字号:
<HTML>
<HEAD>
<TITLE>Advanced Typographic Extensions</TITLE>
<STYLE>
<!--
BODY {background: #FFFFFF; link: #000080}
H1 {font-size: 24pt; color: #c60029}
H2 {font-size: 18pt; color: black}
H3 {font-size: 16pt; color: black}
H4 {font-size: 14pt; color: black}
CAPTION {font-size: 16pt; font-weight: Bold}
A:link {text-decoration: none}
-->
</STYLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000080">
<TABLE WIDTH=480 CELLPADDING=8 CELLSPACING=0 BORDER=0>
<TR><TD><IMG WIDTH=100 HEIGHT=1 ALT="" SRC="/truetype/otspec/pixel.gif" BORDER=0></TD>
<TD><H1>Developing OpenType</H1></TD>
</TR>
<TR><TD></TD><TD ALIGN=TOP>
<H2>Advanced Typographic Extensions (TrueType Open)</H2>
The Advanced Typographic tables (TrueType Open tables) are an extension to the TrueType font standard. TrueType Open fonts contain additional information that extends the capabilities of the fonts to support high-quality international typography:
<UL>
<LI>TrueType Open fonts allow a rich mapping between characters and glyphs, which supports ligatures, positional forms, alternates, and other substitutions.
<LI>TrueType Open fonts include information to support features for two-dimensional positioning and glyph attachment.
<LI>TrueType Open fonts contain explicit script and language information, so a text-processing application can adjust its behavior accordingly.
<LI>TrueType Open fonts have an open format that allows font developers to define their own typographical features.
</UL>
<P>
This overview introduces the power and flexibility of the TrueType Open font model. The TrueType Open tables are described in more detail in the <A HREF="/truetype/otspec/tablist.htm">"Font File Tables"</A> section of the OpenType specification.<P>
The use of TrueType Open tables by Multiple Master OpenType fonts is described <A HREF="#MM">below</A>.<P>
<BR>
<B>TrueType Open at a Glance</B>
<BR>TrueType Open addresses complex typographical issues that especially affect people using text-processing applications in multi-lingual and non-Latin environments.
<BR> TrueType Open fonts may contain alternative forms of characters and mechanisms for accessing them. For example, in Arabic, the shape of a character often varies with the character's position in a word. As shown here, the ha character will take any of four shapes, depending on whether it stands alone or whether it falls at the beginning, middle, or end of a word. TrueType Open helps a text-processing application determine which variant to substitute when composing text.
<P>
<BR>
<CENTER>
<IMG WIDTH=254 HEIGHT=61 ALT="DIAGRAM" SRC="/TRUETYPE/OTSPEC/fig1a.gif">
</CENTER><P>
<FONT FACE="Arial" SIZE=2><B>Figure 1a</B> Isolated, initial, medial, and final forms of the Arabic character ha.</FONT>
<P><BR>
Similarly, TrueType Open helps an application use the correct forms of characters when text is positioned vertically instead of horizontally, such as with Kanji. For example, Kanji uses alternative forms of parentheses when positioned vertically.
<P><BR>
<CENTER>
<IMG WIDTH=240 HEIGHT=88 ALT="DIAGRAM" SRC="/TRUETYPE/OTSPEC/fig1b.gif"></CENTER><P>
<FONT FACE="Arial" SIZE=2><B>Figure 1b</B> Alternative forms of parentheses used when positioning Kanji vertically.</FONT>
<P><BR>
The TrueType Open font format also supports the composition and decomposition of ligatures. For example, English, French, and other languages based on Latin can substitute a single ligature, such as "fi", for its component glyphs - in this case, "f" and "i". Conversely, the individual "f" and "i" glyphs could replace the ligature, possibly to give a text-processing application more flexibility when spacing glyphs to fill a line of justified text.
<P><BR>
<CENTER>
<IMG WIDTH=201 HEIGHT=59 ALT="DIAGRAM" SRC="/TRUETYPE/OTSPEC/fig1c.gif"><P>
<FONT FACE="Arial" SIZE=2><B>Figure 1c</B> Two Latin glyphs and their associated ligature.</FONT>
</CENTER>
<P><BR>
<CENTER>
<IMG WIDTH=277 HEIGHT=68 ALT="DIAGRAM" SRC="/TRUETYPE/OTSPEC/fig1d.gif"><P>
<FONT FACE="Arial" SIZE=2><B>Figure 1d</B> Three Arabic glyphs and their associated ligature.</FONT>
</CENTER>
<P><BR>
Glyph substitution is just one way TrueType Open extends font capabilities. Using precise X and Y coordinates for positioning glyphs, TrueType Open fonts also can identify points for attaching one glyph to another to create cursive text and glyphs that need diacritical or other special marks.
<BR> TrueType Open fonts also may contain baseline information that specifies how to position glyphs horizontally or vertically. Because baselines may vary from one script (set of characters) to another, this information is especially useful for aligning text that mixes glyphs from scripts for different languages.
<P>
<IMG WIDTH=488 HEIGHT=67 ALT="DIAGRAM" SRC="/TRUETYPE/OTSPEC/fig1e.gif">
<P>
<FONT FACE="Arial" SIZE=2><B>Figure 1e</B> A line of text, baselines adjusted, mixing Latin and Arabic scripts.</FONT>
<P><BR>
<B>TrueType versus TrueType Open</B>
<BR>
A TrueType font is a collection of several tables that contain different types of data: glyph outlines, metrics, bitmaps, mapping information, and much more. TrueType Open fonts contain all this basic information, plus additional tables containing information for advanced typography.
<BR> Text-processing applications - referred to as "clients" of TrueType Open - can retrieve and parse the information in TrueType Open tables. So, for example, a text-processing client can choose the correct character shapes and space them properly.
<BR> As much as possible, the tables of TrueType Open define only the information that is specific to the font layout. The tables do not try to encode information that remains constant within the conventions of a particular language or the typography of a particular script. Such information that would be replicated across all fonts in a given language belongs in the text-processing application for that language, not in the fonts.
<P><BR>
<B>TrueType Open terminology</B><BR>
The TrueType Open model is organized around glyphs, scripts, language systems, and features.
<P>
<BR>
<I>Characters versus glyphs</I><BR>
Users don't view or print characters: a user views or prints <I>glyphs</I>. A glyph is a representation of a character. The character "capital letter A" is represented by the glyph "A" in Times New Roman Bold and "A" in Arial Bold. A TrueType font is a collection of glyphs. To retrieve glyphs, the client uses information in the "cmap" table of the font, which maps the client's character codes to glyph indices in the table. <BR>
Glyphs can also represent combinations of characters and alternative forms of characters: glyphs and characters do not strictly correspond one-to-one. For example, a user might type two characters, which might be better represented with a single ligature glyph. Conversely, the same character might take different forms at the beginning, middle, or end of a word, so a font would need several different glyphs to represent a single character. TrueType Open fonts contain a table that provides a client with information about possible glyph substitutions.
<P><BR>
<CENTER>
<IMG WIDTH=250 HEIGHT=58 ALT="DIAGRAM" SRC="/TRUETYPE/OTSPEC/fig1f.gif"><P>
<FONT FACE="Arial" SIZE=2><B>Figure 1f</B> Multiple glyphs for the ampersand character.</FONT>
</CENTER>
<P><BR>
<I>Scripts</I><BR>
A script is composed of a group of related characters, which may be used by one or more languages. Latin, Arabic, and Thai are examples of scripts. A font may use a single script, or it may use many scripts. Within a TrueType Open font, scripts are identified by unique <NOBR>4-byte <I>tags</I>.</NOBR>
<P><BR>
<CENTER>
<IMG WIDTH=172 HEIGHT=53 ALT="DIAGRAM" SRC="/TRUETYPE/OTSPEC/fig1g.gif"><P>
<FONT FACE="Arial" SIZE=2><B>Figure 1g</B> Glyphs in the Latin, Kanji, and Arabic scripts.</FONT>
</CENTER>
<P><BR>
<I>Language systems</I><BR>
Scripts, in turn, may be divided into language systems. For example, the Latin script is used to write English, French, or German, but each language has its own special requirements for text processing. A font developer can choose to provide information that is tailored to the script, to the language system, or to both.
<BR> Language systems, unlike scripts, are not necessarily evident when a text-processing client examines the characters being used. To avoid ambiguity, the user or the operating system needs to identify the language system. Otherwise, the client will use the default language-system information provided with each script.
<P>
<BR>
<CENTER>
<IMG WIDTH=316 HEIGHT=152 ALT="DIAGRAM" SRC="/TRUETYPE/OTSPEC/fig1h.gif"><P></CENTER>
<FONT FACE="Arial" SIZE=2><B>Figure 1h</B> Differences in the English, French, and German language system.</FONT>
<P>
<BR>
<I>Features</I><BR>
Features define the basic functionality of the font. A font that contains tables to handle diacritical marks will have a "mark" feature. A font that supports substitution of vertical glyphs will have a "vert" feature.<BR>
The TrueType Open feature model provides great flexibility to font developers because features do not have to be predefined by Microsoft Corporation. Instead, font developers can work with application developers to determine useful features for fonts, add such features to TrueType Open fonts, and enable client applications to support such features.
<P>
<IMG WIDTH=459 HEIGHT=348 ALT="DIAGRAM" SRC="/TRUETYPE/OTSPEC/fig1i.gif">
<P>
<FONT FACE="Arial" SIZE=2><B>Figure 1i</B> The relationship of scripts, language systems, features, and lookups for substitution and positioning tables.</FONT>
<P><BR>
<I>TrueType Open tables</I><BR>TrueType Open comprises five new tables: GSUB, GPOS, BASE, JSTF, and GDEF. These tables and their formats are discussed in detail in the chapters that follow this overview.
<P>
GSUB: Contains information about glyph substitutions to handle single glyph substitution, one-to-many substitution (ligature decomposition), aesthetic alternatives, multiple glyph substitution (ligatures), and contextual glyph substitution.<P>GPOS: Contains information about X and Y positioning of glyphs to handle single glyph adjustment, adjustment of paired glyphs, cursive attachment, mark attachment, and contextual glyph positioning. <P>BASE: Contains information about baseline offsets on a script-by-script basis.<P>JSTF: Contains justification information, including whitespace and Kashida adjustments.<P>GDEF: Contains information about all individual glyphs in the font: type (simple glyph, ligature, or combining mark), attachment points (if any), and ligature caret (if a ligature glyph).<P>
Common Table Formats: Several <A HREF="/truetype/otspec/chapter2.htm">common table formats</A> are used by the TTO tables.
<P>
<BR>
<B>Text processing with TrueType Open fonts</B><BR>
A text-processing client follows a standard process to convert the string of characters entered by a user into positioned glyphs. To produce text with TrueType Open fonts:
<P>
<OL>
<LI>Using the cmap table in the font, the client converts the character codes into a string of glyph indices.
<LI>Using information in the GSUB table, the client modifies the resulting string, substituting positional or vertical glyphs, ligatures, or other alternatives as appropriate.
<LI>Using positioning information in the GPOS table and baseline offset information in the BASE table, the client then positions the glyphs.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -