[metapost] Anyone have notes / test files for METAFONT?
will.adams at frycomm.com
Thu Jun 29 05:01:22 CEST 2017
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.
On Wed, Jun 28, 2017 at 4:13 AM, luigi scarso <luigi.scarso at gmail.com>
> On Wed, Jun 28, 2017 at 5:56 AM, William Adams <will.adams at frycomm.com>
> > Thanks for the resources!
> > Added the following to my tex.stackexchange query:
> > 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]]
> > : https://i.stack.imgur.com/JrRQI.png
> > Ideally I'd like a solution which makes use of lualatex and PDF --- I'd
> > to be able to open up a metafont file in a text editor, tweak / edit it,
> > then compile the project and instantly see it overlaid on a pixel image
> > possibly surprinted by a vector PDF.
> > I think it's something basic and simple which I'm missing or failing to
> > communicate.
> GF fonts are bitmap fonts, you can inspect them with gftype -images
> It's quite easy with lua to translate the output of gftype -images
> into a metapost bitmap
> graphics, but also it's not hard to write a gftype program in lua.
> In any case, The METAFONTbook ans a recent texlive (ie the latest
> 2017) are almost a must;
> you can find more info on gftype with texdoc -l gftype
> In principle, wiht luatex it's possible to use gf (or pk) font files
> directly without going to dvi:
> it'a a matter of a proper encoding, and right resolution.
> There is an example here, subsection 3
> Of course, in most cases the same results can be obtained with Metapost,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the metapost