⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 os2.htm

📁 TrueType字库标准文档
💻 HTM
📖 第 1 页 / 共 4 页
字号:
<HTML>
<HEAD>
<TITLE>The 'OS/2' Table</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>Table Formats</H1></TD></TR>
<TR><TD></TD><TD ALIGN=TOP>
<H2>OS/2 - OS/2 and Windows Metrics
</H2>
<P>
The OS/2 table consists of a set of metrics
that are required by Windows and OS/2. The layout of this table
is as follows:

<TABLE WIDTH=480 BGCOLOR="#F0F0F0">
<THEAD>
<TR>
<TH BGCOLOR="#C0C0C0">Type</TH><TH BGCOLOR="#C0C0C0">Name of Entry</TH><TH BGCOLOR="#C0C0C0">Comments</TH></TR>
</THEAD><TBODY>
<TR>
<TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>version</TD>
<TD VALIGN=TOP>0x0001</TD></TR>
<TR>
<TD VALIGN=TOP>SHORT</TD><TD VALIGN=TOP>xAvgCharWidth;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>usWeightClass;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>usWidthClass;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>SHORT</TD><TD VALIGN=TOP>fsType;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>SHORT</TD><TD VALIGN=TOP>ySubscriptXSize;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>SHORT</TD><TD VALIGN=TOP>ySubscriptYSize;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>SHORT</TD><TD VALIGN=TOP>ySubscriptXOffset;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>SHORT</TD><TD VALIGN=TOP>ySubscriptYOffset;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>SHORT</TD><TD VALIGN=TOP>ySuperscriptXSize;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>SHORT</TD><TD VALIGN=TOP>ySuperscriptYSize;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>SHORT</TD><TD VALIGN=TOP>ySuperscriptXOffset;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>SHORT</TD><TD VALIGN=TOP>ySuperscriptYOffset;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>SHORT</TD><TD VALIGN=TOP>yStrikeoutSize;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>SHORT</TD><TD VALIGN=TOP>yStrikeoutPosition;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>SHORT</TD><TD VALIGN=TOP>sFamilyClass;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>PANOSE</TD><TD VALIGN=TOP>panose;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>ULONG</TD><TD VALIGN=TOP>ulUnicodeRange1</TD>
<TD VALIGN=TOP>Bits 0-31</TD></TR>
<TR>
<TD VALIGN=TOP>ULONG</TD><TD VALIGN=TOP>ulUnicodeRange2</TD>
<TD VALIGN=TOP>Bits 32-63</TD></TR>
<TR>
<TD VALIGN=TOP>ULONG</TD><TD VALIGN=TOP>ulUnicodeRange3</TD>
<TD VALIGN=TOP>Bits 64-95</TD></TR>
<TR>
<TD VALIGN=TOP>ULONG</TD><TD VALIGN=TOP>ulUnicodeRange4</TD>
<TD VALIGN=TOP>Bits 96-127</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>achVendID[4];</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>fsSelection;</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>usFirstCharIndex</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>usLastCharIndex</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>sTypoAscender</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>sTypoDescender</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>sTypoLineGap</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>usWinAscent</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>usWinDescent</TD>
<TD VALIGN=TOP>&nbsp;</TD></TR>
<TR>
<TD VALIGN=TOP>ULONG</TD><TD VALIGN=TOP>ulCodePageRange1</TD>
<TD VALIGN=TOP>Bits 0-31</TD></TR>
<TR>
<TD VALIGN=TOP>ULONG</TD><TD VALIGN=TOP>ulCodePageRange2</TD>
<TD VALIGN=TOP>Bits 32-63</TD></TR>
</TABLE>&nbsp;&nbsp;<P>


<BR>&nbsp;<BR><FONT SIZE=5>version</FONT>
<TABLE CELLPADDING=2>
<TR>
<TD VALIGN=TOP>Format:</TD><TD>2-byte unsigned short</TD></TR>
<TR>
<TD VALIGN=TOP>Units:</TD><TD>n/a</TD></TR>
<TR>
<TD VALIGN=TOP>Title:</TD><TD>OS/2 table version number. </TD></TR>
<TR>
<TD VALIGN=TOP>Description:</TD><TD>The version number for this OS/2 table.
</TD></TR>
<TR>
<TD VALIGN=TOP>Comments:</TD><TD>The version number allows for identification of the
precise contents and layout for the OS/2 table. The version number
for this layout is one (1). The version number for the previous
layout (in rev.1.5 of this spec and earlier) was zero (0). Version
0 of the OS/2 table was 78 bytes; Version 1 is 86 bytes, having
added the ulCodePageRange1 and ulCodePageRange2 fields. </TD></TR>
</TABLE>&nbsp;&nbsp; 



<BR>&nbsp;<BR><FONT SIZE=5>xAvgCharWidth</FONT>
<TABLE CELLPADDING=2>
<TR>
<TD VALIGN=TOP>Format:</TD><TD>2-byte signed short</TD></TR>
<TR>
<TD VALIGN=TOP>Units:</TD><TD>Pels / em units</TD></TR>
<TR>
<TD VALIGN=TOP>Title:</TD><TD>Average weighted escapement. </TD></TR>
<TR>
<TD VALIGN=TOP>Description:</TD><TD>The Average Character Width parameter specifies the
arithmetic average of the escapement (width) of all of the 26
lowercase letters a through z of the Latin alphabet and the space
character. If any of the 26 lowercase letters are not present,
this parameter should equal the weighted average of <CITE>all</CITE>
glyphs in the font. For non-UGL (platform 3, encoding 0) fonts,
use the unweighted average. </TD></TR>
<TR>
<TD VALIGN=TOP>Comments:</TD><TD> This parameter is a descriptive attribute of the font
that specifies the spacing of characters for comparing one font
to another for selection or substitution. For proportionally spaced
fonts, this value is useful in estimating the length for lines
of text.  The weighting factors provided with this example are
only valid for Latin lowercase letters.  If other character sets,
or capital letters are used, different frequency of use values
should be used.  One needs to be careful when comparing fonts
that use different frequency of use values for font mapping. The
average character width is calculated according to this formula:
 For the lowercase letters only, sum the individual character
widths multiplied by the following weighting factors and then
divide by 1000. For example: </TD></TR>
</TABLE>&nbsp;&nbsp;

<TABLE WIDTH=480 BGCOLOR="#F0F0F0">
<THEAD>
<TR>
<TH BGCOLOR="#C0C0C0">Letter</TH>
<TH BGCOLOR="#C0C0C0">Weight Factor</TH>
<TH BGCOLOR="#C0C0C0">Letter</TH>
<TH BGCOLOR="#C0C0C0">Weight Factor</TH></TR>
</THEAD><TBODY>
<TR>
<TD VALIGN=TOP><CENTER>a</CENTER></TD>
<TD VALIGN=TOP><CENTER>64</CENTER></TD>
<TD VALIGN=TOP><CENTER>o</CENTER></TD><TD VALIGN=TOP><CENTER>56</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP><CENTER>b</CENTER></TD>
<TD VALIGN=TOP><CENTER>14</CENTER></TD>
<TD VALIGN=TOP><CENTER>p</CENTER></TD><TD VALIGN=TOP><CENTER>17</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP><CENTER>c</CENTER></TD>
<TD VALIGN=TOP><CENTER>27</CENTER></TD>
<TD VALIGN=TOP><CENTER>q</CENTER></TD><TD VALIGN=TOP><CENTER>4</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP><CENTER>d</CENTER></TD>
<TD VALIGN=TOP><CENTER>35</CENTER></TD>
<TD VALIGN=TOP><CENTER>r</CENTER></TD><TD VALIGN=TOP><CENTER>49</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP><CENTER>e</CENTER></TD>
<TD VALIGN=TOP><CENTER>100</CENTER></TD>
<TD VALIGN=TOP><CENTER>s</CENTER></TD><TD VALIGN=TOP><CENTER>56</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP><CENTER>f</CENTER></TD>
<TD VALIGN=TOP><CENTER>20</CENTER></TD>
<TD VALIGN=TOP><CENTER>t</CENTER></TD><TD VALIGN=TOP><CENTER>71</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP><CENTER>g</CENTER></TD>
<TD VALIGN=TOP><CENTER>14</CENTER></TD>
<TD VALIGN=TOP><CENTER>u</CENTER></TD><TD VALIGN=TOP><CENTER>31</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP><CENTER>h</CENTER></TD>
<TD VALIGN=TOP><CENTER>42</CENTER></TD>
<TD VALIGN=TOP><CENTER>v</CENTER></TD><TD VALIGN=TOP><CENTER>10</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP><CENTER>i</CENTER></TD>
<TD VALIGN=TOP><CENTER>63</CENTER></TD>
<TD VALIGN=TOP><CENTER>w</CENTER></TD><TD VALIGN=TOP><CENTER>18</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP><CENTER>j</CENTER></TD>
<TD VALIGN=TOP><CENTER>3</CENTER></TD><TD VALIGN=TOP><CENTER>x</CENTER></TD>
<TD VALIGN=TOP><CENTER>3</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP><CENTER>k</CENTER></TD>
<TD VALIGN=TOP><CENTER>6</CENTER></TD><TD VALIGN=TOP><CENTER>y</CENTER></TD>
<TD VALIGN=TOP><CENTER>18</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP><CENTER>l</CENTER></TD>
<TD VALIGN=TOP><CENTER>35</CENTER></TD>
<TD VALIGN=TOP><CENTER>z</CENTER></TD><TD VALIGN=TOP><CENTER>2</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP><CENTER>m</CENTER></TD>
<TD VALIGN=TOP><CENTER>20</CENTER></TD>
<TD VALIGN=TOP><CENTER>space</CENTER></TD><TD VALIGN=TOP><CENTER>166</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP><CENTER>n</CENTER></TD>
<TD VALIGN=TOP><CENTER>56</CENTER></TD>
<TD VALIGN=TOP>&nbsp;</TD><TD VALIGN=TOP>&nbsp;</TD></TR>
</TABLE>&nbsp;&nbsp;<P>


<BR>&nbsp;<BR><FONT SIZE=5>usWeightClass</FONT>
<TABLE CELLPADDING=2>
<TR>
<TD VALIGN=TOP>Format:</TD><TD>2-byte unsigned short</TD></TR>
<TR>
<TD VALIGN=TOP>Title:</TD><TD>Weight class. </TD></TR>
<TR>
<TD VALIGN=TOP>Description:</TD><TD>Indicates the visual weight (degree of blackness
or thickness of strokes) of the characters in the font. </TD></TR>
<TR>
<TD VALIGN=TOP>Comments: </TD></TR>
</TABLE>&nbsp;&nbsp;

<TABLE WIDTH=480 BGCOLOR="#F0F0F0">
<THEAD>
<TR>
<TH BGCOLOR="#C0C0C0">Value</TH>
<TH BGCOLOR="#C0C0C0">Description</TH>
<TH BGCOLOR="#C0C0C0">C Definition<BR>(from windows.h)</TH></TR>
</THEAD><TBODY>
<TR>
<TD VALIGN=TOP>100</TD><TD VALIGN=TOP>Thin</TD>
<TD VALIGN=TOP>FW_THIN</TD></TR>
<TR>
<TD VALIGN=TOP>200</TD><TD VALIGN=TOP>Extra-light (Ultra-light)</TD>
<TD VALIGN=TOP>FW_EXTRALIGHT</TD></TR>
<TR>
<TD VALIGN=TOP>300</TD><TD VALIGN=TOP>Light</TD>
<TD VALIGN=TOP>FW_LIGHT</TD></TR>
<TR>
<TD VALIGN=TOP>400</TD><TD VALIGN=TOP>Normal (Regular)</TD>
<TD VALIGN=TOP>FW_NORMAL</TD></TR>
<TR>
<TD VALIGN=TOP>500</TD><TD VALIGN=TOP>Medium</TD>
<TD VALIGN=TOP>FW_MEDIUM</TD></TR>
<TR>
<TD VALIGN=TOP>600</TD><TD VALIGN=TOP>Semi-bold (Demi-bold)</TD>
<TD VALIGN=TOP>FW_SEMIBOLD</TD></TR>
<TR>
<TD VALIGN=TOP>700</TD><TD VALIGN=TOP>Bold</TD>
<TD VALIGN=TOP>FW_BOLD</TD></TR>
<TR>
<TD VALIGN=TOP>800</TD><TD VALIGN=TOP>Extra-Bold (Ultra-bold)</TD>
<TD VALIGN=TOP>FW_EXTRABOLD</TD></TR>
<TR>
<TD VALIGN=TOP>900</TD><TD VALIGN=TOP>Black (Heavy)</TD>
<TD VALIGN=TOP>FW_BLACK</TD></TR>
</TABLE>&nbsp;&nbsp;<P>


<BR>&nbsp;<BR><FONT SIZE=5>usWidthClass</FONT>
<TABLE CELLPADDING=2>
<TR>
<TD VALIGN=TOP>Format:</TD><TD>2-byte unsigned short</TD></TR>
<TR>
<TD VALIGN=TOP>Title:</TD><TD>Width class. </TD></TR>
<TR>
<TD VALIGN=TOP>Description:</TD><TD>Indicates a relative change from the normal aspect
ratio (width to height ratio) as specified by a font designer
for the glyphs in a font. </TD></TR>
<TR>
<TD VALIGN=TOP>Comments: </TD></TR>
</TABLE>&nbsp;&nbsp;

<TABLE WIDTH=480 BGCOLOR="#F0F0F0">
<THEAD>
<TR>
<TH BGCOLOR="#C0C0C0">Value</TH>
<TH BGCOLOR="#C0C0C0">Description</TH>
<TH BGCOLOR="#C0C0C0">C Definition</TH>
<TH BGCOLOR="#C0C0C0">% of normal</TH></TR>
</THEAD><TBODY>
<TR>
<TD VALIGN=TOP>1</TD><TD VALIGN=TOP>Ultra-condensed</TD>
<TD VALIGN=TOP>FWIDTH_ULTRA_CONDENSED</TD>
<TD VALIGN=TOP><CENTER>50</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP>2</TD><TD VALIGN=TOP>Extra-condensed</TD>
<TD VALIGN=TOP>FWIDTH_EXTRA_CONDENSED</TD>
<TD VALIGN=TOP><CENTER>62.5</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP>3</TD><TD VALIGN=TOP>Condensed</TD>
<TD VALIGN=TOP>FWIDTH_CONDENSED</TD>
<TD VALIGN=TOP><CENTER>75</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP>4</TD><TD VALIGN=TOP>Semi-condensed</TD>
<TD VALIGN=TOP>FWIDTH_SEMI_CONDENSED</TD>
<TD VALIGN=TOP><CENTER>87.5</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP>5</TD><TD VALIGN=TOP>Medium (normal)</TD>
<TD VALIGN=TOP>FWIDTH_NORMAL</TD>
<TD VALIGN=TOP><CENTER>100</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP>6</TD><TD VALIGN=TOP>Semi-expanded</TD>
<TD VALIGN=TOP>FWIDTH_SEMI_EXPANDED</TD>
<TD VALIGN=TOP><CENTER>112.5</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP>7</TD><TD VALIGN=TOP>Expanded</TD>
<TD VALIGN=TOP>FWIDTH_EXPANDED</TD>
<TD VALIGN=TOP><CENTER>125</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP>8</TD><TD VALIGN=TOP>Extra-expanded</TD>
<TD VALIGN=TOP>FWIDTH_EXTRA_EXPANDED</TD>
<TD VALIGN=TOP><CENTER>150</CENTER></TD></TR>
<TR>
<TD VALIGN=TOP>9</TD><TD VALIGN=TOP>Ultra-expanded</TD>
<TD VALIGN=TOP>FWIDTH_ULTRA_EXPANDED</TD>
<TD VALIGN=TOP><CENTER>200</CENTER></TD></TR>
</TABLE>&nbsp;&nbsp;<P>

Although every character in a font
may have a different numeric aspect ratio, each character in a
font of normal width has a relative aspect ratio of one.  When
a new type style is created of a different width class (either
by a font designer or by some automated means) the relative aspect
ratio of the characters in the new font is some percentage greater
or less than those same characters in the normal font -- it is
this difference that this parameter specifies.


<BR>&nbsp;<BR><FONT SIZE=5>fsType</FONT>
<TABLE CELLPADDING=2>
<TR>
<TD VALIGN=TOP>Format:</TD><TD>2-byte unsigned short</TD></TR>
<TR>
<TD VALIGN=TOP>Title:</TD><TD>Type flags. </TD></TR>
<TR>
<TD VALIGN=TOP>Description:</TD><TD>Indicates font embedding licensing rights for the
font. Embeddable fonts may be stored in a document. When a document
with embedded fonts is opened on a system that does not have the
font installed (the remote system), the embedded font may be loaded
for temporary (and in some cases, permanent) use on that system
by an embedding-aware application. Embedding licensing rights
are granted by the vendor of the font. 
<P>
 The <STRONG>TrueType Font Embedding DLL Specification</STRONG> and DLL
release notes describe the APIs used to implement support for
TrueType font embedding and loading. <CITE>Applications that implement
support for font embedding, either through use of the Font Embedding
DLL or through other means, must not embed fonts which are not
licensed to permit embedding. Further, applications loading embedded
fonts for temporary use (see Preview &amp; Print and Editable
embedding below) <STRONG>must</STRONG> delete the fonts when the document
containing the embedded font is closed.
</CITE></TD></TR>
</TABLE>&nbsp;&nbsp;

<TABLE WIDTH=480 BGCOLOR="#F0F0F0">
<THEAD>
<TR>
<TH BGCOLOR="#C0C0C0">Bit</TH><TH BGCOLOR="#C0C0C0">Bit Mask</TH>
<TH BGCOLOR="#C0C0C0">Description</TH></TR>
</THEAD><TBODY>
<TR>
<TD VALIGN=TOP>0</TD><TD VALIGN=TOP>&nbsp;</TD>
<TD VALIGN=TOP>Reserved, must be zero. </TD></TR>
<TR>
<TD VALIGN=TOP>1</TD><TD VALIGN=TOP>0x0002</TD>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -