From: haahr@adobe.com (Paul Haahr)
Subject: Re: NormalizeDesignVector and ConvertDesignVector
Keywords: type 1 multiple master
Organization: Adobe Systems Incorporated
Date: Thu, 5 Nov 1992 18:46:13 GMT

Freek Wiedijk writes

> I just read the Multiple Master standard, Adobe's technical note 5086.
> It isn't clear to me where the operators NormalizeDesignVector and
> ConvertDesignVector, which are called by the Multiple Master findfont,
> come from.
> Are they included in the Multiple Master font (and should _each_ MM
> font contain these operators)?

yes (and yes).  both Adobe's font production tools and fontographer create  
them.  so should any other 3rd party multiple master font tool.

> If these operators _are_ present in Myriad (or in Minion), what's their
> definition there?  Or must I buy these fonts in order to look at these
> definitions?

from MinionMM:

	/NormalizeDesignVector {
	 3 2 roll 345 sub 275 div
	 3 2 roll 450 sub 150 div
	 3 2 roll dup 11 le { dup 8 le { 6 sub 5.71429 div } { 1 sub 20 div }
		ifelse } { dup 18 le { -3 sub 28 div } { -144 sub 216 div }
		ifelse } ifelse
	} bind def
	/ConvertDesignVector {
	 2 index 1 3 index sub mul 1 2 index sub mul 4 1 roll 
	 1 3 index sub 2 index mul 1 2 index sub mul 4 1 roll 
	 2 index 2 index mul 1 2 index sub mul 4 1 roll 
	 1 3 index sub 1 3 index sub mul 1 index mul 4 1 roll 
	 2 index 1 3 index sub mul 1 index mul 4 1 roll 
	 1 3 index sub 2 index mul 1 index mul 4 1 roll 
	 2 index 2 index mul 1 index mul 4 1 roll 
	 pop pop pop
	 0 1 1 7 {index add} for 1 exch sub 8 1 roll
	} bind def

> Also: Is the AMFM file complete without the information given by these
> operators?

the information necessary to construct these operators is included in the AMFM  
file, and any platform-dependent multiple master metric information, such as  
the Macintosh BLND resource.  in the AMFM, look for the fields named  
BlendDesignMap and BlendDesignPositions.

> Also 2: While NormalizeDesignVector maps 0..999 to 0.0..1.0, I would
> _also_ like a mapping from 0..999 to the ranges [Light, Regular,
> Semibold, Bold, Black] and [Condensed, Normal, Semi-extended].  Has
> Adobe standardized this correspondence _officially_ or only de-facto?

NormalizeDesignVector does NOT map 0...999 to 0...1; what it maps depends on  
the font and the axis.  for example, in Minion, on the optical size axis,  
6...72 maps to 0...1, but it's not just a linear mapping.  the BlendDesignMap  
fields in the font and in the AMFM file show what the mapping should be.

in general, the numbering of user design vector coordinates is meant to  
correlate between fonts.  an instance with a '666 wt' in MinionMM should have a  
similar visual weight (boldness) as a '666 wt' instance of MyriadMM.

> If I know that I have the font `MinioMM 367 wt 585 wd 34 op'
> how do I calculate the character widths?

the short answer:  you convert the user design vector [367 585 34] to a weight  
vector and then calculate the dot product of the weight vector with the metrics  
for an individual character.

[detailed example follows.

	PS>/MinionMM findfont begin
	PS>[ 367 585 34 NormalizeDesignVector 3 copy 3 array astore ==
	[0.08 0.9 0.824074]
	PS>ConvertDesignVector ] dup ==
	[0.0161852 0.00140741 0.145667 0.0126667 0.0758148 0.00659259
	0.682333 0.0593333]
	PS>/MinionMM findfont exch makeblendedfont /X exch definefont
	PS>1000 scalefont setfont (A) stringwidth pop ==
	658.13
	PS>

combine this with the metrics from the AFM files:

    MinionMM/Roman/RegCondSix/AFM	C 65 ; WX 567 ; N A ; B 15 0 552 650 ;
    MinionMM/Roman/BoldCondSix/AFM	C 65 ; WX 631 ; N A ; B 25 0 606 650 ;
    MinionMM/Roman/RegSix/AFM		C 65 ; WX 707 ; N A ; B 25 0 682 665 ;
    MinionMM/Roman/BoldSix/AFM		C 65 ; WX 738 ; N A ; B 30 0 708 665 ;
    MinionMM/Roman/RegCondDisplay/AFM	C 65 ; WX 535 ; N A ; B 10 0 525 650 ;
    MinionMM/Roman/BoldCondDisplay/AFM	C 65 ; WX 581 ; N A ; B 10 0 571 650 ;
    MinionMM/Roman/RegDisplay/AFM	C 65 ; WX 662 ; N A ; B 10 0 652 665 ;
    MinionMM/Roman/BoldDisplay/AFM	C 65 ; WX 668 ; N A ; B 10 0 658 665 ;

and take the dot product of the widths [567 631 707 738 535 581 662 668] with  
the weight vector we obtained:

	  567 * 0.0161852
	+ 631 * 0.00140741
	+ 707 * 0.145667
	+ 738 * 0.0126667
	+ 535 * 0.0758148
	+ 581 * 0.00659259
	+ 662 * 0.682333
	+ 668 * 0.0593333
	-------------------
	= 658.1299809

which is (modulo rounding) the number we got above.]

--
paul haahr		adobe systems incorporated
haahr@adobe.com		...!decwrl!adobe!haahr		+1 415 962 6056
Newsgroups: comp.fonts,comp.text.desktop