5

Basically, I have a lot of drawings in a lot of files for a typeface revival I'm working on --- it's optically-sized, and I only have a couple of complete sets (from memory, 28 and 72 pt.) and only one pair of letters where I have all the sizes (cap and lowercase N/n) so what I want to do is work up a system which allows me to:

  • design letters as strokes in METAFONT w/ an adjustment for optical size (and maybe some others)
  • proof these letters on-screen easily / automatically / at least somewhat interactively
  • overlay the proof letters w/ the outlines which I do have
  • get a nice outline from the METAFONT design which I can then use to make an Opentype font

I'm stuck at the step of making a proof and overlaying it --- is there some easy / elegant way to do this? I've managed to use METAFONT to make a .2602gf file, and then used gftodvi to make a .dvi which I can view, but that comes out much larger than a page.

Then, once I've got a METAFONT I'll have to work out getting nice outlines from it and making an OpenType font, but first I need to design the design.

Okay, given a METAFONT eight.mf:

mode_setup;
u# := 2mm#;
define_pixels(u);

beginchar("A", 8u#, 9u#, 5u#);
  z1 = ( 0u,  0u);
  z2 = ( 8u,  0u);
  z3 = ( 1u,  8u);
  z4 = ( 7u,  8u);
  pickup pencircle scaled 1u#;
  draw z4 ..  z1 .. z2 ..  z3 .. cycle;
  pickup pencircle scaled 3u#;
  drawdot z1;
  drawdot z2;
  drawdot z3;
  drawdot z4;
endchar;

\end

we process it using

mf eight.mf

and get the file eight.2602gf

we then run

gftodvi eight.2602gf

which gets us eight.dvi, but when we open that we see:

eight.dvi screengrab

Ideally I'd like a solution which makes use of lualatex and PDF.

WillAdams
  • 7,187
  • 2
    Fascinating what you're doing! Someone turning an existing typeface into Metafont descriptions seems to be rare (I asked a question about it), but everyone who's tried reports it being fun (e.g. this) and I hope it is for you too. Watch out for the last step: getting an outline out of Metafont and making it an OpenType font may be nontrivial though it can be done; see this&this by K Píška – ShreevatsaR Jun 26 '17 at 15:04
  • 2
    Coming to your actual question: can you clarify what you mean by the DVI coming out much larger than a page? Actually a DVI file doesn't contain any information about the page size (that comes from your printer or your DVI→PS or DVI→PDF converter), so the solution here may just be a matter of changing the paper size during the DVI conversion, and/or scaling it after the conversion. If you give an actual example DVI (or gf or mf) file, it will be easier for someone to help you overlay it. – ShreevatsaR Jun 26 '17 at 15:06
  • I don't think forcing LuaTeX to use .mf is the best idea. And many PDF viewers have problems with bitmap fonts. ('Many' being Adobe's, of course.) Not that I know anything about it, but TeX and DVI seems a better bet (even if your viewer then converts the DVI to display it, as it may do). – cfr Jun 28 '17 at 03:59
  • @ShreevatsaR Are you sure about that? TeX must know the page size in order to layout the text, whether it is producing DVI or PDF. It may not know the paper size or, rather, that nominal paper size may not match the paper size used by the backend. – cfr Jun 28 '17 at 04:02
  • @cfr Yes I'm very sure about the DVI format. TeX knows the \hsize and \vsize in which it must lay out its text, also the \hoffset and \voffset by which that text must be placed w.r.t. to the top-left corner of the page, but the paper size itself is not contained in the DVI format. (I am using "page size" and "paper size" interchangeably; perhaps you're making a distinction restricting "page size" to only the \hsize by \vsize area on the page.) – ShreevatsaR Jun 28 '17 at 05:13
  • @ShreevatsaR Yes. I think I'm using 'page size' differently. I was thinking of the page in terms of the layout, as opposed to the physical size which it ends up on later. – cfr Jun 28 '17 at 11:03
  • Using pure DVI is an interesting idea --- I'm just more familiar with PDF and more confident of being able to somehow layer:
    • scanned originals
    • METAFONT (in process)
    – WillAdams Jun 28 '17 at 19:34
  • re-drawn vector
  • using PDF --- this also then allows me to directly inspect things by opening the PDF in a vector editor which will be very useful once I get outlines from MF if I can do so in a direct fashion.

    – WillAdams Jun 28 '17 at 19:41