<div dir="ltr"><div>Thanks! Picked up a copy of the Millenium Edition of _The METAFONTbook_ in preparation for this, made one pass through reading it, and need to find the time and energy for a re-read and to try to do the exercises.</div><div><br></div><div>William</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 28, 2017 at 4:13 AM, luigi scarso <span dir="ltr"><<a href="mailto:luigi.scarso@gmail.com" target="_blank">luigi.scarso@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, Jun 28, 2017 at 5:56 AM, William Adams <<a href="mailto:will.adams@frycomm.com">will.adams@frycomm.com</a>> wrote:<br>
> Thanks for the resources!<br>
><br>
><br>
> Added the following to my tex.stackexchange query:<br>
><br>
> Okay, given a `METAFONT` eight.mf:<br>
> mode_setup;<br>
> u# := 2mm#;<br>
> define_pixels(u);<br>
><br>
> beginchar("A", 8u#, 9u#, 5u#);<br>
> z1 = ( 0u, 0u);<br>
> z2 = ( 8u, 0u);<br>
> z3 = ( 1u, 8u);<br>
> z4 = ( 7u, 8u);<br>
> pickup pencircle scaled 1u#;<br>
> draw z4 .. z1 .. z2 .. z3 .. cycle;<br>
> pickup pencircle scaled 3u#;<br>
> drawdot z1;<br>
> drawdot z2;<br>
> drawdot z3;<br>
> drawdot z4;<br>
> endchar;<br>
><br>
> \end<br>
> we process it using<br>
> mf eight.mf<br>
> and get the file eight.2602gf<br>
> we then run<br>
> gftodvi eight.2602gf<br>
> which gets us eight.dvi, but when we open that we see:<br>
> [![eight.dvi screengrab][1]][1]<br>
><br>
> [1]: <a href="https://i.stack.imgur.com/JrRQI.png" target="_blank" rel="noreferrer">https://i.stack.imgur.com/<wbr>JrRQI.png</a><br>
> Ideally I'd like a solution which makes use of lualatex and PDF --- I'd like<br>
> to be able to open up a metafont file in a text editor, tweak / edit it,<br>
> then compile the project and instantly see it overlaid on a pixel image (and<br>
> possibly surprinted by a vector PDF.<br>
><br>
> I think it's something basic and simple which I'm missing or failing to<br>
> communicate.<br>
<br>
<br>
</div></div>GF fonts are bitmap fonts, you can inspect them with gftype -images<br>
It's quite easy with lua to translate the output of gftype -images<br>
into a metapost bitmap<br>
graphics, but also it's not hard to write a gftype program in lua.<br>
<br>
In any case, The METAFONTbook ans a recent texlive (ie the latest<br>
2017) are almost a must;<br>
you can find more info on gftype with texdoc -l gftype<br>
<br>
In principle, wiht luatex it's possible to use gf (or pk) font files<br>
directly without going to dvi:<br>
it'a a matter of a proper encoding, and right resolution.<br>
There is an example here, subsection 3<br>
<a href="http://www.guitex.org/home/images/ArsTeXnica/AT021/latino-article.pdf" target="_blank" rel="noreferrer">http://www.guitex.org/home/<wbr>images/ArsTeXnica/AT021/<wbr>latino-article.pdf</a><br>
Of course, in most cases the same results can be obtained with Metapost,<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
luigi<br>
</font></span></blockquote></div><br></div>