[metapost] Trying to use MT1 to make outline fonts... (again)

luigi scarso luigi.scarso at gmail.com
Wed Jun 20 17:54:31 CEST 2012


On Wed, Jun 20, 2012 at 4:25 PM, Boguslaw Jackowski <jacko at bop.com.pl> wrote:
>
>
> Have you tried Luigi Scarso's mflua:
>
>  https://github.com/luigiScarso/mflua
>
> If so, I'd be very interested in your comments.
>
> Cheers -- Jacko
>
> --
> BOP s. c.
> ul. Bora-Komorowskiego 24, 80-377 Gdansk, Poland
> tel. (+48 58) 553 46 59,  fax (+48 58) 511 03 81
> bop at bop.com.pl, http://www.bop.com.pl
>From README
"""
MFLua is a new implementation of MetaFont which is 100% compatible
with MetaFont 2.718281.
It's still a proof-of-concept. For copyrights see README.orig .

You need ConTeXt MKIV (see wiki.contextgarden.net)
and a recent Linux 32 bit; there is already a mf executable available
into the Work directory,
so that it is not necessary to compile the code.
The program is not even an alpha release, so definitively don't use it
in a production environment.
"""
More info (please forgive me for the bad english)
https://github.com/luigiScarso/mflua/tree/master/paper
mflua.pdf
mflua-2012.pdf

Practically, MFLua is like mf2ps: a modification of the original
metafont pascal-web source code  to collect data about the curves.
In this case, the modification follow the example of Luatex: it's an
embedding of  a  Lua interpreter inside Metafont.
There is a capital difference with Luatex: there is no way to
communicate with the Lua interpreter from a Metafont source, and you
can
observe the state of Metafont only by means of a few functions
(see https://github.com/luigiScarso/mflua/blob/master/texk/web2c/mfluadir/mflua.h)

In the folder
https://github.com/luigiScarso/mflua/tree/master/test/skeleton
there is a very simple example

The function end_program.lua
https://github.com/luigiScarso/mflua/blob/master/test/skeleton/end_program.lua

is called by metafont just before the end, and it saves the data as
metapost curves into envelope.tex .
(You need ConTeXt MKIV to process envelope.pdf to get a pdf;
the bash script test-pen.pdf
https://github.com/luigiScarso/mflua/blob/master/test/skeleton/test-pen.sh
run metafont and context in one command.)

Usually a new snapshot occurs for the BachoTeX meeting (around end
April / begin May ): for the next meeting I would like to store more
information about the pen  i.e. not only the polygonal version
of a elliptical pen. In this way the start and the end point of a path
stroked with a pen could be described by a more simple curves.

Please, note that this is *not* a production quality software. There
are  many details to fix, and it's very likely that there are some
errors --- even in the lua code of the skeleton folder.
BTW,
the bodyfont of mflua-2012.pdf is type1 version of ConcreteOT.otf
and was produced with then unmodified Metafont sources of concrete 10 pt
(see
https://github.com/luigiScarso/mflua/tree/master/test/ccr10
)
The paper is composed with pdfLatex and published in the proceedings
of the 2012 BachTeX conference. Given that I'm not expert wiht
pdfLatex,
the ligatures (ff, ffl ,ffi) are broken, but if you use the original
opentype with Context MKIV there is no such problems.
I consider it an experiment, not a good font.

-- 
luigi



More information about the metapost mailing list