[tex-k] METAFONT/MetaPost: Display-size fonts and limit on numerical values
Laurence Finston
Laurence.Finston at gmx.de
Thu Apr 14 10:50:21 CEST 2022
Hello,
I've been working on creating display-size fonts with MF and MP and I have a problem with the limitation in MF that the value of a numerical values must be < 4096 (MFbook, p. 50).
I've attached the file `hollow_test.pdf' with a sample and the tarball `display.tgz' with various mf, gf, pk, tex, dvi, ps, pdf and make files needed to reproduce it.
The font `A_hollow' (which contains only the character "A") can be generated with magnifications up to magstep6 (2.98598) for
mode == ljfour (600dpi) but only up to magstep5 (2.48831) for mode == ultre (1200dpi). A value between 2 and 3cm causes it to
fail, whereby 3cm is not a very large dimension for a display font.
In MP using one of the -numbersystem options, e.g., "double", causes this problem to disappear. Would it be possible to implement this in MF and if so, could anyone estimate how hard this is likely to be?
Of course, it would be possible to use MP to generate a single PostScript font instead of using MF to generate a bit-map font with multiple resolutions. However it would be nice to be able to be able to do the latter. In addition, while the MP manual describes up to a point how to use MP for making fonts, it states the following: "Some editing would be required in order to merge them into a downloadable Type 3 PostScript font" (with respect to CM). It doesn't go further into what "some editing" implies and it seems to me that that might not be entirely straightforward. I haven't researched this thoroughly yet but so far I haven't found a simple recipe for it.
I used GNU 3DLDF to generate `A_hollow.mf'. I called MP's `glyph' command by calling MP from within 3DLDF (via `system') in order to obtain the paths for the "A" character from CM Sans Serif Bold Extended 10pt. Then I had 3DLDF write MF code as its output, i.e., into `A_hollow.mf'. I've attached the 3DLDF source in the file `A_hollow.ldf'. However, I will be changing it because I'm currently
making changes to 3DLDF. For example, it will be possible to produce both MF and MP output with a single run of the program.
Thanks.
Laurence Finston
-------------- next part --------------
A non-text attachment was scrubbed...
Name: A_hollow.ldf
Type: application/octet-stream
Size: 16676 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-k/attachments/20220414/d40d2999/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: display.tgz
Type: application/x-compressed-tar
Size: 353393 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-k/attachments/20220414/d40d2999/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hollow_test.pdf
Type: application/pdf
Size: 56873 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-k/attachments/20220414/d40d2999/attachment-0001.pdf>
More information about the tex-k
mailing list.