Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 6b465285c9860724a695461ac61807f4 > files > 575

fontforge-1.0-1.20120731.9.mga5.i586.rpm

<HTML>
<HEAD>
  <!-- Created with AOLpress/2.0 -->
  <!-- AP: Created on: 5-Feb-2004 -->
  <!-- AP: Last modified: 16-Apr-2004 -->
  <LINK REL="icon" href="fftype16.png">
  <TITLE>Multiple Master Dialog</TITLE>
  <LINK REL="stylesheet" TYPE="text/css" HREF="FontForge.css">
</HEAD>
<BODY>
<DIV id="in">
<H1 ALIGN=Center>
  Multiple Master Dialog
</H1>
<P>
Allows you to create or modify a multiple master font
<H2>
  <A NAME="MM">What is a multiple master font?</A>
</H2>
<P>
A multiple master font is a
(<A HREF="http://partners.adobe.com/asn/developer/pdfs/tn/5015.Type1_Supp.pdf">PostScript
Type1</A>) font which contains, in one font description several extreme styles
of a font family and code for interpolating between them to produce intermediate
designs. Apple has a
<A HREF="http://developer.apple.com/fonts/TTRefMan/RM06/Chap6fvar.html">similar
concept </A>for TrueType -- The only name I've seen given to this is "Apple
Distortable Font" -- I call both multiple master.
<P>
A multiple master font has several axes along which variation may occur.
For example a font might allow variation along the Weight axis (everything
from Thin to Black), along the Width axis (Condensed to Extended) and along
the Optical Size axis (from 6pt to 72pt). The Type1 spec requires that there
be a design for every extreme combination along each axis. In the above example
there should be:
<UL>
  <LI>
    Thin Condensed 6pt
  <LI>
    Thin Condensed 72pt
  <LI>
    Thin Extended 6pt
  <LI>
    Thin Extended 72pt
  <LI>
    Black Condensed 6pt
  <LI>
    Black Condensed 72pt
  <LI>
    Black Extended 6pt
  <LI>
    Black Extended 72pt
</UL>
<P>
A font designer may also add intermediate designs as well.
<P>
From these extreme designs PostScript is able to interpolate any intermediate
style desired (as Normal Normal 12pt).
<P>
Apple has a slightly different format, not only must the extreme designs
be specified but the default designs must be as well (so Apple requires 3
designs per axis as opposed to 2 for PostScript). In the above example there
would be 27 designs:
<UL>
  <LI>
    Thin Condensed 6pt
  <LI>
    Thin Condensed 12pt
  <LI>
    Thin Condensed 72pt
  <LI>
    Thin 6pt
  <LI>
    Thin 12pt
  <LI>
    Thin 72pt
  <LI>
    Thin Extended 6pt
  <LI>
    Thin Extended 12pt
  <LI>
    Thin Extended 72pt
  <LI>
    Regular Condensed 6pt
  <LI>
    ...
  <LI>
    Black Extended 72pt
</UL>
<P>
Apple also allows for intermediate designs, but FontForge does not currently
support this.
<P>
A font designer first determines how many axes s/he will need. PostScript
allows a maximum of 4 axes in a Type1 font. FontForge only supports 4 axes
for Apple's fonts too.
<P>
Then s/he provides information about each axis, specifically:
<UL>
  <LI>
    The axis type (Weight, Width, Optical Size, etc)
  <LI>
    The range of design values over which this axis will vary<BR>
    Typically 1-999 for Weight and Width (1 being extremely thin or condensed,
    999 being extremely black or extended) or 6-72 for Optical Size<BR>
    Apple fonts seem to have a different default range, .05-2.0
  <LI>
    A mapping from the design value range to the range [0 1] called the normalized
    range. (Apple maps to [-1,1] with the default design mapped to 0)<BR>
    This mapping is piecewise linear. Generally it will just be the obvious
    (1=&gt;0.0, 999=&gt;1.0) but it is possible to add intermediate points so
    that 500=&gt;.3 which would give a different scaling between 1&amp;500 than
    between 500&amp;999.
  <LI>
    In an apple distortable font, each axis must be given a name which may be
    translated into multiple languages.
</UL>
<P>
Then s/he determines the number of designs needed. In a Type1 font there
may be at most 16, and at least 2^axis-count. So in a 3 axis font there must
be at least 8 designs, one for each extreme.
<P>
For Type1 fonts s/he needs to write two postscript functions
<DL>
  <DT>
    NormalizeDesignVector
  <DD>
    FontForge is always able to generate this function for the user (unless the
    user wants something non-linear). This maps a vector of design values to
    their normalized values (in our three axis case above it might map [400 500
    12] to [.4 .5 .09])
  <DT>
    ConvertDesignVector
  <DD>
    In the usual cases FontForge is able to create this function for the user
    (but in more complicated cases, with intermediate designs it is unable to
    do so). This function takes a normalized vector (as produced above) and figures
    out how much each weight to give each design in the final blend.
</DL>
<P>
Finally s/he provides a default vector of design weights (one for each design).
This will be used when the multiple master font is used without any additional
information being provided. It should describe the normal variant of the
font. The sum of all the weights must be 1.0. In the above example, if we
take [400 500 12] as our definition of "normal" this vector might look like:
[.273 .027 .273 .027 .182 .018 .182 .018].
<P>
Apple distortable fonts do not need the postscript functions, nor the default
weight vector mentioned above. Instead they need a set of named styles which
map a particular coordinate in design space to a name (which may be provided
in several languages).
<P>
Corresponding glyphs in each design must have certain similarities:
<UL>
  <LI>
    There must be the same number of contours (or references)
  <LI>
    There must be the same number of points on each contour
  <LI>
    Corresponding contours must be oriented in the same direction
  <LI>
    In a Type1 fonts there must be corresponding hints, and hint substitution
    points.
  <LI>
    In a TrueType font corresponding glyphs share the same instructions (and
    'fpgm' and 'prep' tables), but may have different 'cvt ' tables.
</UL>
<H2>
  The Dialog
</H2>
<P>
This dialog is used for creating and modifying multiple master fonts. It
contains several sub-dialogs which must be processed in sequence, and follows
pretty closely to the process described above. I will first show the sequence
for Adobe's fonts, and then explain Apple's fonts.
<P>
<IMG SRC="mmcounts.png" WIDTH="476" HEIGHT="448" ALIGN="Right">The first
screen allows you to choose the type of distortable font you wish to generate
(Adobe Multiple Master, or Apple), the number of axes in your font, and the
number of master designs, and a family name (which will be used for creating
new fonts, if you need any new ones).<BR CLEAR=ALL>
<P>
<IMG SRC="mmaxes.png" WIDTH="476" HEIGHT="448" ALIGN="Right">The second screen
gives you control of each axis. There are a few standard axis types defined
by Adobe (and by Apple), but you could define your own. Note that there are
fields which are disabled here, they only apply to Apple's fonts.<BR CLEAR=ALL>
<P>
<IMG SRC="mmdesigns.png" WIDTH="476" HEIGHT="448" ALIGN="Right">Then you
must assign a font to each of the master designs. You can either have FontForge
create a new font for you (as here), or use an already loaded font, or browse
your disk for a font (don't try to use the same font twice).
<P>
You must also specify the coordinates of this design along the axes. If you
use the minimum number of designs they will all be extremes and the coordinate
values will be either 0 or 1. Unless you are working with intermediate designs
it is best to let FontForge initialize this field for you.<BR CLEAR=ALL>
<P>
<IMG SRC="mmfuncs.png" WIDTH="476" HEIGHT="448" ALIGN="Right">This screen
shows the postscript functions needed to map a design vector to a weight
vector (ie. given positions on each of the design axes, these produce blending
coefficients for each master design). In most useful case FontForge is able
to generate these functions automatically, but if you use intermediate designs
things get too complicated for FontForge and you must enter the functions
manually.<BR CLEAR=ALL>
<P>
<IMG SRC="mmfinal.png" WIDTH="476" HEIGHT="448" ALIGN="Right">The last screen
shows the default weights (which you may either enter directly or as coordinates
along the design axes), the ForceBoldThreshold private dictionary
entry).<BR CLEAR=ALL>
<H3>
  An Apple distortable font.
</H3>
<P>
<IMG SRC="mmappleaxes.png" WIDTH="476" HEIGHT="448" ALIGN="Right">The dialog
looks very similar, but there are a few differences. In the Axis pane of
the dlg, you must also specify a default value for the axis, and a translatable
name.<BR Clear=ALL>
<P>
<IMG SRC="mmnamedstyles.png" WIDTH="476" HEIGHT="448" ALIGN="Right">Apple
allows coordinates in design space to be named. Here the name "Black" is
given to the location where Weight=3.2 (the darkest value) and
<IMG SRC="mmnamingastyle.png" WIDTH="368" HEIGHT="470" ALIGN="Left">Width=1
(the default value). Again these names can be translated into multiple
languages.<BR Clear=ALL>
<H2>
  A suggestion
</H2>
<P>
Adobe's Type1 fonts require all the extreme designs to be specified, so that
for a 3 axis multiple master font, you need 8 designs. This is because Adobe
only seems to expect interpolation to be used. On the other hand in many
cases extrapolation can be used to generate some of these designs. In the
3 axis case you only need to produces 4 designs (one for the base, and one
each to express the variation on each axis).
<P>
I will describe the 2 axis case in detail (because it is easier to visualize):
Suppose you have a font which varies on the Weight axis from 50 to 900, and
on the Width axis from 100 to 1000. And suppose you have created fonts for
Weight=50,Width=100 &amp; Weight=50, Width=100 &amp; Weight=900,Width=100.
Call these designs 0, 1 and 2. We wish to produce a design, 3, with Weight=900,
Width=1000.
<P ALIGN=Center>
<IMG SRC="mmextrapolate2.png" WIDTH="132" HEIGHT="132">
<P>
First we must produce an intermediate design (which we will delete later),
call it "I". Use FontForge's Element-&gt;Interpolate Fonts command to produce
a design which is 50% of the way from design 1 to design 2 (This will be
Weight=475, Width=550). Then produce another design with is 200% of the way
from design 0 to design "I". This will be the desired extreme design.
<P>
Adobe's Type2 designs appear to have been prepared to allow this approach,
but the multiple master operators were dropped from the Type2 spec, and the
question is moot.
<P>
<P ALIGN=Center>
-- <A HREF="mmmenu.html">Up</A> -- <A HREF="overview.html">TOC</A> --
<P>
</DIV>
</BODY></HTML>