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

📄 mmsd.htm

📁 TrueType字库标准文档
💻 HTM
字号:
<HTML>
<HEAD>
<TITLE>The 'MMSD' 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>MMSD</H2>

<p>This table contains supplementary data enabling MM fonts to be used on a
host. The MMSD table consists of a header that contains a version number of the
table (version), initially set to 1.0 (0x00010000), and offsets to the axis,
instance, and style tables (axis, instance, and style).  An empty (missing) table
is indicated by setting the corresponding offset to NULL.<BR>&nbsp;

<H3>MMSD Header</H3>
<TABLE BGCOLOR="#F0F0F0"  WIDTH="50%" 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>fixed32</TD><TD VALIGN=TOP>version</TD><TD NOWRAP=NOWRAP>Version of MMSD table--Initially 0x00010000</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>axis</TD><TD NOWRAP=NOWRAP>Offset to Axis table--From beginningof MMSD table
--May be NULL</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>instance</TD><TD NOWRAP=NOWRAP>Offset to Instance table--From beginning of MMSD table
--May be NULL</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>style</TD><TD NOWRAP>Offset to Style table--From beginning of MMSD table--May be NULL</TD></TR>
</TABLE>&nbsp;&nbsp;<P>

<H3>Axis Table</H3>

<p>The axis table contains supplementary axis information.
It consists of an axis count (nAxes), the size of an axis (axisSize), and
an array of AxisRecords.<BR>&nbsp;

<TABLE BGCOLOR="#F0F0F0"  WIDTH="50%" 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>nAxes</TD><TD NOWRAP=NOWRAP>Number of axes</TD></TR>
<TR><TD VALIGN=TOP>uint16</TD><TD VALIGN=TOP>axisSize</TD><TD NOWRAP=NOWRAP>Axis record size(bytes)</TD></TR>
<TR><TD VALIGN=TOP>struct</TD><TD VALIGN=TOP>AxisRecord[nAxes]</TD><TD NOWRAP=NOWRAP>Array of AxisRecords</TD></TR>
</TABLE>&nbsp;&nbsp;<P>

<H3>AxisRecord</H3>
<P>An AxisRecord specifies a long and short label offsets(longLabel and shortLabel) to Pascal strings that are used for UI display and PostScript font naming, respectively, e.g. &quot;Weight&quot; and &quot; wt&quot;. (The first byte of a Pascal string specifies the number of string bytes that follow.)<BR>&nbsp;

<TABLE BGCOLOR="#F0F0F0"  WIDTH="50%" 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>longLabel</TD><TD NOWRAP=NOWRAP>Offset to long label Pascal string--From beginning of MMSD table</TD></TR>
<TR><TD VALIGN=TOP>Offset</TD><TD VALIGN=TOP>shortLabel</TD><TD NOWRAP=NOWRAP>Offset to short label Pascal string--From beginning of MMSD table</TD></TR>
</TABLE>&nbsp;&nbsp;<P>

<H3>Instance Table</H3>

<p>The instance table contains supplementary instance
information. It consists of an instance count (nInstances), the size an instance
(instanceSize), and an array of InstanceRecords. The first instance record (index 0) specifies the default instance.<BR>&nbsp;

<TABLE BGCOLOR="#F0F0F0"  WIDTH="50%" 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>nInstances</TD><TD NOWRAP=NOWRAP>Number of instances</TD></TR>
<TR><TD VALIGN=TOP>uint16</TD><TD VALIGN=TOP>instanceSize</TD><TD NOWRAP=NOWRAP>Instance record size(bytes)</TD></TR>
<TR><TD VALIGN=TOP>struct</TD><TD VALIGN=TOP>InstanceRecord</TD><TD NOWRAP=NOWRAP>Array of InstanceRecords[nInstances]</TD></TR>
</TABLE>&nbsp;&nbsp;<P>

<H3>InstanceRecord</H3>

<p>An InstanceRecord specifies a primary instance name
suffix offset (nameSuffix) to a Pascal string that is appended to the 533-converted
FontName and an underscore character in order to form the instance
FontName. For example, FontName &quot;CaflischScriptMM&quot; becomes &quot;CafliScrMM&quot;
after applying the 533 rule, and becomes &quot;CafliScrMM_280 LT&quot; after appending
an underscore and the instance name suffix of &quot;280 LT&quot;.
<BR>&nbsp;

<TABLE BGCOLOR="#F0F0F0"  WIDTH="50%" 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> nameSuffix</TD><TD NOWRAP=NOWRAP>Offset to instance name suffix Pascal string<br> -From beginning of MMSD table</TD></TR>
</TABLE>&nbsp;&nbsp;<P>

<H3>Style Table</H3>

<p>The style table contains supplementary style information.
It consists of a style count (nStyles), the size of a style (styleSize), and an array of
StyleRecords.<BR>&nbsp;

<TABLE BGCOLOR="#F0F0F0"  WIDTH="50%" 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>nStyles</TD><TD NOWRAP=NOWRAP>Number of styles</TD></TR>
<TR><TD VALIGN=TOP>uint16</TD><TD VALIGN=TOP>styleSize</TD><TD NOWRAP=NOWRAP>Style record size(bytes)</TD></TR>
<TR><TD VALIGN=TOP>struct</TD><TD VALIGN=TOP>StyleRecord</TD><TD NOWRAP=NOWRAP>Array of StyleRecords[nStyles]</TD></TR>      
</TABLE>&nbsp;&nbsp;<P>


<H3>StyleRecord</H3>

<p>A StyleRecord specifies style modifications that
may be applied to an axis. It consists of an axis index (axis), style modification
flags (flags), and an array of two ActionRecords. The flag specifies one
of four style bits: bold, italic, condensed, and extended; all other bits are
reserved.<BR>&nbsp;

<TABLE BGCOLOR="#F0F0F0"  WIDTH="50%" 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>uint8</TD><TD VALIGN=TOP>axis</TD><TD NOWRAP=NOWRAP>Axis index for this style</TD></TR>
<TR><TD VALIGN=TOP>uint8</TD><TD VALIGN=TOP>flag</TD><TD VALIGN=TOP>Style flag, b0-bold, b1-italic, --b5-condensed,
b6-extended,--b2-4,7-15 reserved.</TD></TR>
<TR><TD VALIGN=TOP>struct</TD><TD VALIGN=TOP>ActionRecord[2]</TD><TD NOWRAP=NOWRAP>Array of two ActionRecords</TD></TR>
</TABLE>&nbsp;&nbsp;<P> 


<H3>ActionRecord</H3>

<p>An ActionRecord specifies the style modification
at a point on the axis. It consists of an axis coordinate point (point) and
the change applied to the axis coordinate (delta) at that point.  Two ActionRecords may be used to specify different behaviors at two points.  Intermediate points then interpolate between these. (If two points and therefore two actions aren't required the second
ActionRecord may be marked as inactive with a delta field of zero.)<BR>&nbsp;

<TABLE BGCOLOR="#F0F0F0"  WIDTH="50%" 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>fixed32</TD><TD VALIGN=TOP>point</TD><TD VALIGN=TOP>Style change point(design units)</TD></TR>
<TR><TD VALIGN=TOP>fixed32</TD><TD VALIGN=TOP>delta</TD><TD VALIGN=TOP>Style change delta(design units)</TD></TR>
</TABLE>&nbsp;&nbsp;<P>

The use of offset and record size fields in MMSD
table allows for a very flexible upgrade path without breaking existing implementations.
However, for this scheme to be successful implementations must
use these fields when calculating offsets for subtable and array element
access.

<p>The Pascal string data for the short and long labels
and the instance name suffix follows the last defined table.<P>

<p>Example of MMSD table for CaflishScriptMM, a single
axis multiple master font with 4 primary instances and one style.<BR>
&nbsp;<BR>
version       =1.0 (00010000)<BR>
axisOffset    =000a<BR>
instanceOffset=0012<BR>
styleOffset   =001e<BR>
--- axix table<BR>
nAxes   =1<BR>
axisSize=4<BR>
--- axis[index]={longLabel,shortLabel}<BR>
[0]={0034,003b}<BR>
--- instance table<BR>
nInstances  =4<BR>
instanceSize=2<BR>
--- instance[index]=nameSuffix<BR>
[0]=003f [1]=0046 [2]=004d [3]=0054<BR>
--- style table<BR>
nStyles  =1<BR>
styleSize=18<BR>
--- style[index]={axis,flag,{point,delta},{point,delta}}<BR>
[0]={0,01,{280.0,276.0},{556.0,84.0}}<BR>
--- strings[offset]={length,string}<BR>
[0034]={6,&lt;Weight&gt;} [003b]={3,&lt; wt&gt;}<BR>
[003f]={6,&lt;280 LT&gt;} [0046]={6,&lt;406 RG&gt;} <BR>
[004d]={6,&lt;556 SB&gt;} [0054]={6,&lt;640 BD&gt;}<BR>


<p>The weight varies along the axis from design coordinate
280 (light) to design coordinate 640 (bold). The style table specifies
bold style modifications using a 2-point interpolation scheme:<BR>


coord   280     556<BR>
delta   276      84<BR>
<P>
Bold styles applied to points between the second point and the end of the axis (640) add the delta (84) to that point and then clamp the result to the end of the axis ensuring the result is within the range of valid axis coordinates.


&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 05 September 1996
</FONT>
</TD></TABLE>
</BODY>
</HTML>



⌨️ 快捷键说明

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