[Openfontlibrary] Generating Font Samples

Ed Trager ed.trager at gmail.com
Wed May 21 09:24:44 PDT 2008


Hi, everyone,

>> George Williams wrote:
> The biggest issue I have is and has always been the lack of font
> samples. When I open the main page I see a year old piece of "olds". I
> don't see anything that makes me want to look deeper. At least a font
> image that changes every week (or something) would be better.
>

Everyone should take a look at the commercial http://myfonts.com to
see a good implementation of modern Web 2.0 interactivity on a fonts
site.  When one types a string into a text box at the top of the page,
a whole slew of font sample PNG images are updated on-the-fly using
AJAX.

This is really quite helpful.  search for "Irish" fonts on
myfonts.com, and you will see the query result set naturally contains
many fonts -- but unfortunately many of those fonts don't contain the
accented Latin glyphs actually needed for Irish orthography like
"Áḋaiṁ" -- and this is instantly apparent to the user.  So you can
instantly see whether a certain font will meet your graphic as well as
orthographic needs.

IMHO, anything less than this kind of interactivity no longer makes
the grade (it goes without saying that the current OFLB site just
fails completely).

George Williams' aforementioned fontimage (
http://fontforge.sf.net/fontimage.html ) already provides one option
for server-side generation of the font samples.  George, can you tell
me if fontimage uses Pango or some other library to handle non-Latin
and complex layout scripts?

Coincidentally, just yesterday I got bored working on something at
work, so I decided to take a break and work on a little
Pango-Cairo-based utility quite similar in principle to George's
fontimage.  When completed, I plan to use my utility on some sort of
AJAXified page on http://unifont.org.  My plan is to create something
at least as good as what myfonts.com has, if not better (as they say,
copying is the sincerest form of flattery ... ).  Using Pango-Cairo
guarantees that the utility will work for complex scripts like Arabic
and Thai, a necessity for the unifont.org site.

My Pango-Cairo code is quite straightforward and I will release it
when I am done.  For my version, I decided that I should modify the
fontconfig ".fonts.conf" file so that my utility will (via fontconfig)
end up using SIL "Unicode BMP Fallback" font for missing glyphs.
Using the aforementioned "Áḋaiṁ" string as an example, output from my
utility looks fine for Gentium which of course has all the necessary
glyphs, but shows that the Greek MgOpen Moderna and Modata just won't
be useable for Irish:

      http://eyegene.ophthy.med.umich.edu/pango-cairo/gentium.png
      http://eyegene.ophthy.med.umich.edu/pango-cairo/moderna.png
      http://eyegene.ophthy.med.umich.edu/pango-cairo/modata.png

If done right, the "instant feedback" provided by AJAXified font web
sites may help foster community involvement in filling in the missing
glyphs required for better orthographic coverage in Open community
fonts.

Best - Ed Trager


More information about the Openfontlibrary mailing list