[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

multiple scaling suffices with \installfont



Strang behaviour with multiple scaling suffices
-----------------------------------------------


Motivation:  

The x-heights (height of the character 'small x') in several Adobe
fonts is much larger then the x-heights in the CM fonts.  When using
NewCentury and Symbol together with CM fonts, it is useful to shrink
NewCentury and Symbol in order to best match the x-heights of the CM
family.  Appropriate scaling factors are 0.93 for NewCent and 0.85 for
Symbol.


Implementation:

I have modified the mathptm example as distributed with fontinst. 
The tex input file is 'fontptcm.tex'. To evaluate solely the behaviour 
of the 'scaled <size>' suffix, I have just added two of these suffices
to 'fontptcm.tex'. No other changes were made. 

Original:

   \installfont{zpzccmry}
      {cmsy10,zryhax,psyr,ptmr8r,%
       unsetalf,pzcmi8r scaled 1124,mathsy}
      {OMS}{OMS}{pzccm}{m}{n}{}

Modified:

   \installfont{zpzccmry}
      {cmsy10,zryhax,psyr scaled 850,ptmr8r scaled 930,%
       unsetalf,pzcmi8r scaled 1124,mathsy}
      {OMS}{OMS}{pzccm}{m}{n}{}


Result:

This modification results a virtual property list where the scaling factor 
850 is set for both fonts, for psyr as well as for ptmr8r. Here is 
the header from 'zpzccmry.vpl':

   (MAPFONT D 0 (FONTNAME cmsy10) (FONTDSIZE R 10.0) (FONTAT R 10.0))
   (MAPFONT D 1 (FONTNAME psyr) (FONTDSIZE R 10.0) (FONTAT R 8.5))
   (MAPFONT D 2 (FONTNAME pzcmi8r) (FONTDSIZE R 10.0) (FONTAT R 11.23999))
   (MAPFONT D 3 (FONTNAME ptmr8r) (FONTDSIZE R 10.0) (FONTAT R 8.5))



Further trials:

In the above modification the scaled suffix is used for two .mtx files
which are read immediately one after each other by the \installfont
macro.  If only one of these scaling suffices is used at a time, then
everything works fine:

Variant 1:
   \installfont{zpzccmry}
      {cmsy10,zryhax,psyr scaled 850,ptmr8r,%
       unsetalf,pzcmi8r scaled 1124,mathsy}
      {OMS}{OMS}{pzccm}{m}{n}{}

Variant 2:
   \installfont{zpzccmry}
      {cmsy10,zryhax,psyr,ptmr8r scaled 930,%
       unsetalf,pzcmi8r scaled 1124,mathsy}
      {OMS}{OMS}{pzccm}{m}{n}{}


Variants 1 and 2 both result the correct scaling. Furthermore, 
the scaling of pzcmi8r is not effected in any case. The strang 
behaviour only occurs if two scaling suffices are used immediately 
one after each other. To further test this, an empty .mtx file 
was created (named 'empty.mtx'), and a variant was tested where 
the empty file is read between the two scaled files:

Variant 3:

   \installfont{zpzccmry}
      {cmsy10,zryhax,psyr scaled 850,empty,ptmr8r scaled 930,%
       unsetalf,pzcmi8r scaled 1124,mathsy}
      {OMS}{OMS}{pzccm}{m}{n}{}


Variant 3 yields the correct result as can be seen from the header of 
the .vpl file 'zpzccmry.vpl':

   (MAPFONT D 0 (FONTNAME cmsy10) (FONTDSIZE R 10.0) (FONTAT R 10.0))
   (MAPFONT D 1 (FONTNAME psyr) (FONTDSIZE R 10.0) (FONTAT R 8.5))
   (MAPFONT D 2 (FONTNAME pzcmi8r) (FONTDSIZE R 10.0) (FONTAT R 11.23999))
   (MAPFONT D 3 (FONTNAME ptmr8r) (FONTDSIZE R 10.0) (FONTAT R 9.29993))


Two more variants further characterize the problem (If the scaled
suffix has been set, it must first be reset to the default of 1000, before
it can be set to another value):

Variant 4:

   \installfont{zpzccmry}
      {cmsy10,zryhax,psyr scaled 850,empty scaled 1000,ptmr8r scaled 930,%
       unsetalf,pzcmi8r scaled 1124,mathsy}
      {OMS}{OMS}{pzccm}{m}{n}{}

   Result (correct):
   
   (MAPFONT D 0 (FONTNAME cmsy10) (FONTDSIZE R 10.0) (FONTAT R 10.0))
   (MAPFONT D 1 (FONTNAME psyr) (FONTDSIZE R 10.0) (FONTAT R 8.5))
   (MAPFONT D 2 (FONTNAME pzcmi8r) (FONTDSIZE R 10.0) (FONTAT R 11.23999))
   (MAPFONT D 3 (FONTNAME ptmr8r) (FONTDSIZE R 10.0) (FONTAT R 9.29993))  %% OK

   
Variant 5:

   \installfont{zpzccmry}
      {cmsy10,zryhax,psyr scaled 850,empty scaled 1100,ptmr8r scaled 930,%
       unsetalf,pzcmi8r scaled 1124,mathsy}
      {OMS}{OMS}{pzccm}{m}{n}{}

   Result (wrong):

   (MAPFONT D 0 (FONTNAME cmsy10) (FONTDSIZE R 10.0) (FONTAT R 10.0))
   (MAPFONT D 1 (FONTNAME psyr) (FONTDSIZE R 10.0) (FONTAT R 8.5))
   (MAPFONT D 2 (FONTNAME pzcmi8r) (FONTDSIZE R 10.0) (FONTAT R 11.23999))
   (MAPFONT D 3 (FONTNAME ptmr8r) (FONTDSIZE R 10.0) (FONTAT R 8.5))  %% Should be 9.3
   
 
Conclusion:

It seems that a scaling suffix is not accepted if the scaling suffix of 
the .mtx file read immediately before the current file is different from 1000. 
Thus, it is not possible to use scaling suffices for two .mtx files which 
are read one after each other. A workaround for this problem is to read 
an empty .mtx file between the two .mtx files. 



Peter

------------------------------------------------------------------
Peter Slickers                                slickers@imb-jena.de
                                                Tel: 03641/65-6208
Biocomputing                                    Fax: 03641/65-6210
Institut fuer Molekulare Biotechnologie

Postal address:  Postfach 100 813, D-07708 Jena, Germany
Courier address: Beutenbergstrasse 11, Jena

http://www.imb-jena.de/~slickers/
------------------------------------------------------------------