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

📄 eblc.htm

📁 TrueType字库标准文档
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<HTML>
<HEAD>
<TITLE>The 'EBLC' 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=530 CELLPADDING=8 CELLSPACING=0 BORDER=0>

<TR>
<TD><IMG WIDTH=100 HEIGHT=1 SRC="/TRUETYPE/OTSPEC/pixel.gif" BORDER=0></TD>
<TD><H1>Table Formats</H1></TD>
</TR>

<TR>
<TD></TD><TD ALIGN=TOP><H2>EBLC - Embedded Bitmap Location
Table</H2>
<P>
Three new tables are used to embed bitmaps
in TrueType fonts. They are the 'EBLC' table for embedded bitmap
locators, the 'EBDT' table for embedded bitmap data, and the 'EBSC'
table for embedded bitmap scaling information. TrueType embedded
bitmaps are called 'sbits' (for &quot;scaler bitmaps&quot;). A
set of bitmaps for a face at a given size is called a strike.
<P>
The 'EBLC' table identifies the sizes and glyph ranges of the
sbits, and keeps offsets to glyph bitmap data in indexSubTables.
The 'EBDT' table then stores the glyph bitmap data, also in a
number of different possible formats. Glyph metrics information
may be stored in either the 'EBLC' or 'EBDT' table, depending
upon the indexSubTable and glyph bitmap formats. The 'EBSC' table
identifies sizes that will be handled by scaling up or scaling
down other sbit sizes.
<P>
The 'EBLC' table uses the same format as the Apple QuickDraw GX
'bloc' table.
<P>
The 'EBLC' table begins with a header containing the table version
and number of strikes. A TrueType font may have one or more strikes
embedded in the 'EBDT' table.

<BR>&nbsp;<BR><FONT SIZE=5>eblcHeader</FONT>
<TABLE WIDTH=530 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>FIXED</TD><TD VALIGN=TOP>version</TD>
<TD VALIGN=TOP>initially defined as 0x00020000</TD></TR>
<TR>
<TD VALIGN=TOP>ULONG</TD><TD VALIGN=TOP>numSizes</TD>
<TD VALIGN=TOP>Number of bitmapSizeTables</TD></TR>
</TABLE>
&nbsp;&nbsp;<P>
<P>
The eblcHeader is followed immediately by
the bitmapSizeTable array(s). The numSizes in the eblcHeader indicates
the number of bitmapSizeTables in the array. Each strike is defined
by one bitmapSizeTable.

<BR>&nbsp;<BR><FONT SIZE=5>bitmapSizeTable</FONT>
<TABLE WIDTH=530 BGCOLOR="#F0F0F0"><THEAD>
<TR>
<TH BGCOLOR="#C0C0C0">Type</TH><TH BGCOLOR="#C0C0C0">Name</TH><TH BGCOLOR="#C0C0C0">Description</TH></TR>
<TR>
<TD VALIGN=TOP>ULONG</TD><TD VALIGN=TOP>indexSubTableArrayOffset</TD>
<TD VALIGN=TOP>offset to index subtable from beginning of EBLC.</TD></TR>
<TR>
<TD VALIGN=TOP>ULONG</TD><TD VALIGN=TOP>indexTablesSize</TD>
<TD VALIGN=TOP>number of bytes in corresponding index subtables and array</TD></TR>
<TR>
<TD VALIGN=TOP>ULONG</TD><TD VALIGN=TOP>numberOfIndexSubTables</TD>
<TD VALIGN=TOP>an index subtable for each range or format change</TD></TR>
<TR>
<TD VALIGN=TOP>ULONG</TD><TD VALIGN=TOP>colorRef</TD>
<TD VALIGN=TOP>not used; set to 0.</TD></TR>
<TR>
<TD VALIGN=TOP>sbitLineMetrics</TD>
<TD VALIGN=TOP>hori</TD><TD VALIGN=TOP>line metrics for text rendered horizontally</TD></TR>
<TR>
<TD VALIGN=TOP>sbitLineMetrics</TD>
<TD VALIGN=TOP>vert</TD><TD VALIGN=TOP>line metrics for text rendered vertically</TD></TR>
<TR>
<TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>startGlyphIndex</TD>
<TD VALIGN=TOP>lowest glyph index for this size</TD></TR>
<TR>
<TD VALIGN=TOP>USHORT</TD><TD VALIGN=TOP>endGlyphIndex</TD>
<TD VALIGN=TOP>highest glyph index for this size</TD></TR>
<TR>
<TD VALIGN=TOP>BYTE</TD><TD VALIGN=TOP>ppemX</TD>
<TD VALIGN=TOP>horizontal pixels per Em</TD></TR>
<TR>
<TD VALIGN=TOP>BYTE</TD><TD VALIGN=TOP>ppemY</TD>
<TD VALIGN=TOP>vertical pixels per Em</TD></TR>
<TR>
<TD VALIGN=TOP>BYTE</TD><TD VALIGN=TOP>bitDepth</TD>
<TD VALIGN=TOP>the Microsoft rasterizer v.1.7 or greater supports the following bitDepth values, as described below: 1, 2, 4, and 8.</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>flags</TD>
<TD VALIGN=TOP>vertical or horizontal (see bitmapFlags)</TD>
</TR>
</TABLE>&nbsp;&nbsp;<P>
<P>
The indexSubTableArrayOffset is the offset
from the beginning of the 'EBLC' table to the indexSubTableArray.
Each strike has one of these arrays to support various formats
and discontiguous ranges of bitmaps. The indexTablesSize is the
total number of bytes in the indexSubTableArray and the associated
indexSubTables. The numberOfIndexSubTables is a count of the indexSubTables
for this strike.
<P>
The horizontal and vertical line metrics contain the ascender,
descender, linegap, and advance information for the strike. The
line metrics format is described in the following table:

<BR>&nbsp;<BR><FONT SIZE=5>sbitLineMetrics</FONT>
<TABLE WIDTH=530 BGCOLOR="#F0F0F0"><THEAD>
<TR>
<TH BGCOLOR="#C0C0C0">Type</TH><TH BGCOLOR="#C0C0C0">Name</TH></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>ascender</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>descender</TD></TR>
<TR>
<TD VALIGN=TOP>BYTE</TD><TD VALIGN=TOP>widthMax</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>caretSlopeNumerator</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>caretSlopeDenominator</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>caretOffset</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>minOriginSB</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>minAdvanceSB</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>maxBeforeBL</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>minAfterBL</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>pad1</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>pad2</TD></TR>
</TABLE>&nbsp;&nbsp;<P>
<P>
The caret slope determines the angle at which
the caret is drawn, and the offset is the number of pixels (+
or -) to move the caret. This is a signed char since we are dealing
with integer metrics. The minOriginSB, minAdvanceSB , maxBeforeBL,
and minAfterBL are described in the diagrams below. The main need
for these numbers is for scalers that may need to pre-allocate
memory and/or need more metric information to position glyphs.
All of the line metrics are one byte in length. The line metrics
are not used directly by the rasterizer, but are available to
clients who want to parse the 'EBLC' table.
<P>
The startGlyphIndex and endGlyphIndex describe the minimum and
maximum glyph codes in the strike, but a strike does not necessarily
contain bitmaps for all glyph codes in this range. The indexSubTables
determine which glyphs are actually present in the 'EBDT' table.
<P>
The ppemX and ppemY fields describe the size of the strike in
pixels per Em. The ppem measurement is equivalent to point size
on a 72 dots per inch device. Typically, ppemX will be equal to
ppemY for devices with 'square pixels'. To accommodate devices
with rectangular pixels, and to allow for bitmaps with other aspect
ratios, ppemX and ppemY may differ.
<P>
The bitDepth field is used to specify the number of levels of gray used in the embedded bitmaps. The Microsoft rasterizer v.1.7 or greater support the following values.
<BR>&nbsp;<BR><FONT SIZE=5>bitDepth</FONT>
<TABLE WIDTH=530 BGCOLOR="#F0F0F0"><THEAD>
<TR>
<TH BGCOLOR="#C0C0C0">Value</TH><TH BGCOLOR="#C0C0C0">Description</TH></TR>
<TR>
<TD VALIGN=TOP>1</TD><TD VALIGN=TOP>black/white</TD></TR>
<TR>
<TD VALIGN=TOP>2</TD><TD VALIGN=TOP>4 levels of gray</TD></TR>
<TR>
<TD VALIGN=TOP>4</TD><TD VALIGN=TOP>16 levels of gray</TD></TR>
<TR>
<TD VALIGN=TOP>8</TD><TD VALIGN=TOP>256 levels of gray</TD></TR>
</TABLE>&nbsp;&nbsp;<P>
The 'flags' byte contains two bits to indicate the direction of
small glyph metrics: horizontal or vertical.  The remaining bits
are reserved.

<BR>&nbsp;<BR><FONT SIZE=5>Bitmap Flags</FONT>
<TABLE WIDTH=530 BGCOLOR="#F0F0F0"><THEAD>
<TR>
<TH BGCOLOR="#C0C0C0">Type</TH><TH BGCOLOR="#C0C0C0">Value</TH><TH BGCOLOR="#C0C0C0">Description</TH></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>0x01</TD>
<TD VALIGN=TOP>Horizontal</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>0x02</TD>
<TD VALIGN=TOP>Vertical</TD></TR>
</TABLE>&nbsp;&nbsp;<P>
<P>
The colorRef and bitDepth fields are reserved
for future enhancements. For monochrome bitmaps they should have
the values colorRef=0 and bitDepth=1.
<P>
<A HREF="/TRUETYPE/OTSPEC/BIGIMAGE.HTM">IMAGE: Horizontal & Vertical Metrics</a>

<P><BR>
Associated with the image data for every glyph in a strike is
a set of glyph metrics. These glyph metrics describe bounding
box height and width, as well as side bearing and advance width
information. The glyph metrics can be found in one of two places.
For ranges of glyphs (not necessarily the whole strike) whose
metrics may be different for each glyph, the glyph metrics are
stored along with the glyph image data in the 'EBDT' table. Details
of how this is done is described in the 'EBDT' section of this
document. For ranges of glyphs whose metrics are identical for
every glyph, we save significant space by storing a single copy
of the glyph metrics in the indexSubTable in the 'EBLC'.
<P>
There are also two different formats for glyph metrics: big glyph
metrics and small glyph metrics. Big glyph metrics define metrics
information for both horizontal and vertical layouts. This is
important in fonts (such as Kanji) where both types of layout
may be used. Small glyph metrics define metrics information for
one layout direction only. Which direction applies, horizontal
or vertical, is determined by the 'flags' field in the bitmapSizeTable.

<BR>&nbsp;<BR><FONT SIZE=5>bigGlyphMetrics</FONT>
<TABLE WIDTH=530 BGCOLOR="#F0F0F0">
<THEAD>
<TR>
<TH BGCOLOR="#C0C0C0">Type</TH><TH BGCOLOR="#C0C0C0">Name</TH></TR>
<TR>
<TD VALIGN=TOP>BYTE</TD><TD VALIGN=TOP>height</TD></TR>
<TR>
<TD VALIGN=TOP>BYTE</TD><TD VALIGN=TOP>width</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>horiBearingX</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>horiBearingY</TD></TR>
<TR>
<TD VALIGN=TOP>BYTE</TD><TD VALIGN=TOP>horiAdvance</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>vertBearingX</TD></TR>
<TR>
<TD VALIGN=TOP>CHAR</TD><TD VALIGN=TOP>vertBearingY</TD></TR>
<TR>
<TD VALIGN=TOP>BYTE</TD><TD VALIGN=TOP>vertAdvance</TD></TR>
</TABLE>&nbsp;&nbsp;<P>

⌨️ 快捷键说明

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