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

Re: Metric font transformations with dvips



The least confusing way of dealing with anistropic scaling is
to keep one axis fixed and to then adjust the overall size isotropically
using TeX's font commands.  That way you can use the existing DVIPS
mechansim for doing the scaling.

At 05:20 PM 11/22/1999 +0100, Lars Hellström wrote:
>My problem is as follows: I've got a PS font and want to tell dvips to
>scale this font horizontally by some amount, scale it vertically by some
>(different) amount, and to slant it by some amount. This operation is
>trivial in postscript, so I should only have to figure out how to put the
>right code in the right place. The dvips manual isn't much help here since
>it only gives a few examples of what can be done, but it is at least clear
>that this should be achieved by putting some suitable piece of PS code
>between two double quotes on the corresponding line in psfonts.map. So far,
>everything is fine.
>
>Now consider the example that I want to scale horizontally by 1.3 (extend
>by 30%), scale vertically by 0.8 (compress by 20%), and slant by 0.167.
>This seems like just the kind of task the postscript operator makefont was
>made for, so I expect that the right thing to write would be
>
>   [1.3 0 0.167 0.8 0 0] makefont
>
>but this doesn't work. The reason is that it requires the thing on top of
>the operand stack to be the font dictionary of the font that is to be
>transformed, and this is very far from the case at the point where dvips
>inserts PS code from psfonts.map. Instead it seems that what is on the
>stack are some selected components from the dictionary, but as I can't make
>sense of the code (in particular, the definition of rf), I have failed to
>determine exactly which and in exactly which order. I'm not a postscript
>hacker, though. Can someone perhaps shed some light on this?
>
>Lars Hellström
>

Berthold K.P. Horn  mailto:bkph@ai.mit.edu  http://www.ai.mit.edu/people/bkph