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

📄 gasp.htm

📁 TrueType字库标准文档
💻 HTM
字号:
<HTML>
<HEAD>
<TITLE>The 'gasp' 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>gasp - Grid-fitting And Scan-conversion
Procedure</H2>
<P>
This table contains information which describes
the preferred rasterization techniques for the typeface when it
is rendered on grayscale-capable devices. This table also has
some use for monochrome devices, which may use the table to turn
off hinting at very large or small sizes, to improve performance.
<P>
At very small sizes, the best appearance on grayscale devices
can usually be achieved by rendering the glyphs in grayscale without
using hints. At intermediate sizes, hinting and monochrome rendering
will usually produce the best appearance. At large sizes, the
combination of hinting and grayscale rendering will typically
produce the best appearance.
<P>
If the 'gasp' table is not present in a typeface, TrueType will
apply default rules to decide how to render the glyphs on grayscale
devices.
<P>
The 'gasp' table consists of a header followed by groupings of
'gasp' records:

<BR>&nbsp;<BR><FONT SIZE=5>gasp Table</FONT>
<TABLE WIDTH=480 BGCOLOR="#F0F0F0">
<THEAD>
<TR><TH BGCOLOR="#C0C0C0">Type</TH><TH BGCOLOR="#C0C0C0">Name</TH><TH BGCOLOR="#C0C0C0">Description</TH></TR>
</THEAD>
<TBODY>
<TR><TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>version</TD><TD VALIGN=TOP>Version number (set to 0)</TD></TR>
<TR><TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>numRanges</TD><TD VALIGN=TOP>Number of records to follow</TD></TR>
<TR><TD VALIGN=TOP>GASPRANGE</TD><TD VALIGN=TOP>gaspRange[numRanges]</TD><TD VALIGN=TOP>Sorted by ppem</TD></TR>
</TABLE>&nbsp;&nbsp;
<P>
Each GASPRANGE record looks like this:

<TABLE WIDTH=480 BGCOLOR="#F0F0F0">
<THEAD>
<TR><TH BGCOLOR="#C0C0C0">Type</TH><TH BGCOLOR="#C0C0C0">Name</TH><TH BGCOLOR="#C0C0C0">Description</TH></TR>
</THEAD>
<TBODY>
<TR><TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>rangeMaxPPEM</TD><TD VALIGN=TOP>Upper limit of range, in PPEM</TD></TR>
<TR><TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>rangeGaspBehavior</TD><TD VALIGN=TOP>Flags describing desired rasterizer behavior.</TD></TR>
</TABLE>&nbsp;&nbsp;
<P>
There are two flags for the rangeGaspBehavior
flags:

<TABLE WIDTH=480 BGCOLOR="#F0F0F0">
<THEAD>
<TR><TH BGCOLOR="#C0C0C0">Flag</TH><TH BGCOLOR="#C0C0C0">Meaning</TH></TR>
</THEAD>
<TBODY>
<TR><TD VALIGN=TOP>GASP_GRIDFIT</TD><TD VALIGN=TOP>Use gridfitting</TD></TR>
<TR><TD VALIGN=TOP>GASP_DOGRAY</TD><TD VALIGN=TOP>Use grayscale rendering</TD></TR>
</TABLE>&nbsp;&nbsp;
<P>
The set of bit flags may be extended in the
future.The four currently defined values of rangeGaspBehavior
would have the following uses:

<TABLE WIDTH=480 BGCOLOR="#F0F0F0">
<THEAD>
<TR><TH BGCOLOR="#C0C0C0">Flag</TH><TH BGCOLOR="#C0C0C0">Value</TH><TH BGCOLOR="#C0C0C0">Meaning</TH></TR>
</THEAD>
<TBODY>
<TR><TD VALIGN=TOP>GASP_DOGRAY</TD><TD VALIGN=TOP>0x0002</TD><TD VALIGN=TOP>small sizes, typically ppem&lt;9</TD></TR>
<TR><TD VALIGN=TOP>GASP_GRIDFIT</TD><TD VALIGN=TOP>0x0001</TD><TD VALIGN=TOP>medium sizes, typically 9&lt;=ppem&lt;=16</TD></TR>
<TR><TD VALIGN=TOP>GASP_DOGRAY|GASP_GRIDFIT</TD><TD VALIGN=TOP>0x0003</TD><TD VALIGN=TOP>large sizes, typically ppem&gt;16</TD></TR>
<TR><TD VALIGN=TOP>(neither)</TD><TD VALIGN=TOP>0x0000</TD><TD VALIGN=TOP>optional for very large sizes, typically ppem&gt;2048</TD></TR>
</TABLE>&nbsp;&nbsp;<P>
<P>
The records in the gaspRange[] array must
be sorted in order of increasing rangeMaxPPEM value. The last
record should use 0xFFFF as a sentinel value for rangeMaxPPEM
and should describe the behavior desired at all sizes larger than
the previous record's upper limit. If the only entry in 'gasp'
is the 0xFFFF sentinel value, the behavior described will be used
for <CITE>all</CITE> sizes.

<BR>&nbsp;<BR><FONT SIZE=5>Sample 'gasp' table</FONT>

<TABLE WIDTH=480 BGCOLOR="#F0F0F0">
<THEAD>
<TR><TH BGCOLOR="#C0C0C0">Field</TH><TH BGCOLOR="#C0C0C0">Value</TH><TH BGCOLOR="#C0C0C0">Meaning</TH></TR>
</THEAD>
<TBODY>
<TR><TD VALIGN=TOP>version</TD><TD VALIGN=TOP>0x0000</TD><TD VALIGN=TOP>&nbsp;</TD></TR>
<TR><TD VALIGN=TOP>numRanges</TD><TD VALIGN=TOP>0x0003</TD><TD VALIGN=TOP>&nbsp;</TD></TR>
<TR><TD VALIGN=TOP>Range[0], Flag</TD><TD VALIGN=TOP>0x0008  0x0002</TD><TD VALIGN=TOP>ppem&lt;=8, grayscale only</TD></TR>
<TR><TD VALIGN=TOP>Range[1], Flag</TD><TD VALIGN=TOP>0x0010  0x0001</TD><TD VALIGN=TOP>9&lt;=ppem&lt;=16, gridfit only</TD></TR>
<TR><TD VALIGN=TOP>Range[2], Flag</TD><TD VALIGN=TOP>0xFFFF  0x0003</TD><TD VALIGN=TOP>16&lt;ppem, gridfit and grayscale</TD></TR>
</TABLE>

&nbsp;<br>&nbsp;<br>
<FONT FACE="Arial, Helvetica" SIZE=1>
Microsoft Typography Web Site <A HREF="/truetype/otspec/CPYRIGHT.htm">&copy; 1996 Microsoft Corporation</A>
<BR>
Comments to the Microsoft Typography group: <A HREF="mailto:ttwsite@microsoft.com">ttwsite@microsoft.com</A>
<BR>
<A HREF="/truetype/default.htm">Home</a> | <a href="/truetype/creators.htm">Information for Developers</a>
&nbsp;<BR>
Last updated 03 September 1996

</FONT>
</TD></TR>
</TABLE>
</BODY>
</HTML>


⌨️ 快捷键说明

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