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.
Type | Name | Description |
---|---|---|
fixed32 | version | Version of MMSD table -Initially 0x00010000 |
Offset | axis | Offset to Axis table -From beginning of MMSD table, may be NULL |
Offset | instance | Offset to Instance table -From beginning of MMSD table, may be NULL |
Offset | style | Offset to Style table -From beginning of MMSD table May be NULL |
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.
Type | Name | Description |
---|---|---|
uint16 | nAxes | Number of axes |
uint16 | axisSize | Axis record size(bytes) |
struct | AxisRecord[nAxes] | Array of AxisRecords |
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. "Weight" and " wt". (The first byte of a Pascal string specifies the number of string bytes that follow.)
Type | Name | Description |
---|---|---|
Offset | longLabel | Offset to long label Pascal string -From beginning of MMSD table |
Offset | shortLabel | Offset to short label Pascal string -From beginning of MMSD table |
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.
Type | Name | Description |
---|---|---|
uint16 | nInstances | Number of instances |
uint16 | instanceSize | Instance record size(bytes) |
struct | InstanceRecord | Array of InstanceRecords[nInstances] |
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 "CaflischScriptMM" becomes "CafliScrMM"
after applying the 533 rule, and becomes "CafliScrMM_280 LT" after appending
an underscore and the instance name suffix of "280 LT".
Type | Name | Description |
---|---|---|
Offset | nameSuffix | Offset to instance name suffix Pascal string -From beginning of MMSD table |
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.
Type | Name | Description |
---|---|---|
uint16 | nStyles | Number of styles |
uint16 | styleSize | Style record size(bytes) |
struct | StyleRecord | Array of StyleRecords[nStyles] |
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.
Type | Name | Description |
---|---|---|
uint8 | axis | Axis index for this style |
uint8 | flag | Style flag, b0-bold, b1-italic, --b5-condensed, b6-extended,--b2-4,7-15 reserved. |
struct | ActionRecord[2] | Array of two ActionRecords |
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.)
Type | Name | Description |
---|---|---|
fixed32 | point | Style change point(design units) |
fixed32 | delta | Style change delta(design units) |
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.
The Pascal string data for the short and long labels and the instance name suffix follows the last defined table.
Example of MMSD table for CaflishScriptMM, a single
axis multiple master font with 4 primary instances and one style.
version =1.0 (00010000)
axisOffset =000a
instanceOffset=0012
styleOffset =001e
--- axis table
nAxes =1
axisSize=4
--- axis[index]={longLabel,shortLabel}
[0]={0034,003b}
--- instance table
nInstances =4
instanceSize=2
--- instance[index]=nameSuffix
[0]=003f [1]=0046 [2]=004d [3]=0054
--- style table
nStyles =1
styleSize=18
--- style[index]={axis,flag,{point,delta},{point,delta}}
[0]={0,01,{280.0,276.0},{556.0,84.0}}
--- strings[offset]={length,string}
[0034]={6,<Weight>} [003b]={3,< wt>}
[003f]={6,<280 LT>} [0046]={6,<406 RG>}
[004d]={6,<556 SB>} [0054]={6,<640 BD>}
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:
coord 280 556
delta 276 84
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.