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

Re: Metric font transformations with dvips



Berthold wrote:
>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.

That is true, but I was not looking for the least confusing solution, and
neither can I use TeX quite like that. The origin of the problem is that I
am writing a map file writer for fontinst---when given the font
transformations that have been carried out it should be able to produce the
corresponding map file entries. As fontinst does have a command
\yscalefont, the map file writer must be able to produce entries that have
fonts scaled vertically. As dvips does not seem to provide any documented
way of scaling vertically (regardless of whether it would also scale
horizontally or not) the problem remains.

(And so does Laurent's problem, even though it seems to me like it should
be possible to solve with virtual fonts.)

That said, I must also point out that the idea of achieving vertical
scaling using isotropic scaling followed by horizontal scaling is not
without merit, since even if it appears to be a very roundabout and
illogical method for DVI to PS drivers, it might well be the only possible
approach for many DVI drivers with other targets. Since fontinst could bury
the isotropic scaling in a virtual font, it would also mean that I could
solve the dvips problem without having to resort to a hacky solution based
on accessing an undocumented data structure. On the other hand, it might
require that at least one major part of fontinst is reconstructed, so it
would require some work.

Since the characteristics of other DVI drivers are of interest for the
continued development, I have a few questions about which metric
transformations a driver can do that appear to be of interest. They are
primarily directed to the maintainers of the various DVI drivers that exist
("What can YOUR driver do?"), but I'm happy as long as someone answers them.

Can your DVI driver (by putting suitable text in its .map or analogous
file) be ordered to
1. scale a font vertically by an arbitrary amount?
2. scale a font vertically by some fixed amount?
3. scale a font horizontally by an arbitrary amount?
4. scale a font horizontally by some fixed amount?
5. slant a font by an arbitrary amount?
6. slant a font by some fixed amount?
7. scale a font isotropically by an arbitrary amount?
8. scale a font isotropically by some fixed amount?
9. reencode a font so that glyphs without an encoding position is given one?
10. reencode a font, but only so that glyphs that have an encoding position
are permutated?

By "some fixed amount" I mean that the driver might have the ability to do
this transformation, but only by a fixed amount that the user cannot
change---for example, it might have a default scaling factor for "extended"
fonts, which one can only choose to use or not to use. (For low resolution
output devices, many users wouldn't consider the exact amout that
important.)

Lars Hellström