[luatex] Why obsolete the fontforge name space?

Yue Wang yuleopen at gmail.com
Tue Mar 24 04:42:38 CET 2009


Hi, Taco:

in the release notes, you said:

> The included fontforge code is stripped considerably, and
> the lua table to access the code is renamed to 'fontloader'.
> The old name ('fontforge') will remain present for a while,
> but will eventually go away.

What about leaving the fontforge name space in LuaTeX, and create a
synoname as font loader (fontloader=fontforge)?
In the future we might want to use different font library, so the user
can switch to something they want.
(For example, Mac user might prefer to use ATS, so some volunteers can
create a binding in LuaTeX and users can choose the library using
something like "fontloader=ats")
At some point (when LuaTeX can load external system/lua library) some
active user can also develop binding for freetype2 to gain faster
speed and less memory consumption, and we can also switch to the
binding using "fontloader=freetype2"
All we need is to write the luafflib like binding code.

Yue Wang



PS, on the dev-luatex mailing list
(http://www.ntg.nl/mailman/private/dev-luatex/2009-January/002217.html),
you doubted whether freetype2 will be sufficient for advanced fonts,
and in fact ft2 have most of the features you want:

> Not only that. Stuff that needs doing:
> * parsing of Type1 & Type0 (CID composite) fonts

FT2 supports CID-keyed Type 1 fonts (see
http://www.freetype.org/freetype2/index.html)

> * parsing of sfnt containers (ttc and dfont)

FT2 supports TTC and dfont (see the same link)
related code could be found in ftobjs.c and src/sfnt/*
btw, dfont is obsolete. In Mac OS X 10.6 Snow Leopard, all major
system fonts will be shipped in TTC format.

> * parsing of TTF and OTF fonts (including AAT)

No problem parsing these fonts.
But no full AAT support (FT2 can only validate GX and AAT tables[feat,
prop, etc.], see src/gxvalid/*).

> * bounding box calculations for PostScript-based glyphs

FT2 can calculate Control Box of a glyph very efficient (As dicussed
in previous mails)

> * parsing and processing of GPOS & GSUB tables

This is not done in FT2, but HarfBuzz (developed and maintained by FT2
people. The code is also used in QT and Pango)

> * font reencoding

FT2 can encode Type 1 fonts into Unicode.

> * converting to all of this to a lua table

Possible to write the binding code (similar to luafflib.c), but need extra work.

> To be honest, I have no idea how many of those things can be done
> by freetype2, but I highly doubt its OTF support will be sufficient.

see HarfBuzz.

So I think it is possible to write a similar binding.
Maybe we can apply for a Google SoC project for this?

Yue Wang


More information about the luatex mailing list