managing fonts (Unix)


Subject: managing fonts (Unix)
From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Tue Feb 20 2001 - 12:18:02 CST


Hi Sam,

> Here's what I would like to see happen:
>
> When AbiWord starts up (maybe only the first time), it figures out
> what fonts are available, and uses them. It also tries to find the
> AbiWord fonts, but doesn't refuse to start if they aren't found. And
> if the user wants to add additional fonts, then thay can do so inside
> AbiWord.

Couple of comments. First, the reason why we need 'our' fonts is to
make sure that there are actually fonts we can use. You do not
need to worry about this in Windows since the system always
comes with the 3 standard fonts Arial, Times New Roman and
Courier New, but under X we have to provide these if we want to be
sure we have them.

There are other reasons why I would not get rid off the AW fonts
folder, and would not look for any fonts outside of it. I use Word for
most of my work and one of the annoying things is having to scroll
through hundreds of fonts I never use; I only use 5-6 fonts on
regular basis, but after installing Win98 and the applications I use,
there are over 1300 fonts in my fonts folder. I would not want to see
the same in Unix AW; there is a comparable number of fonts
available to my X server.

Further, we only support pfa/pfb and ttf fonts, so you would have to
go through all the fonts available to X, sorting out what we can use
and what not. The problem is that the X server does not tell you
whether the font is bdf, pfa, ttf or what; it was intentionally designed
to obscure any such distinctions. To X font is a font, so you will
need to come up with some hack to get around that.

I think by far the cleanest solution to the Unix/X font mess is to
have a fonts folder as we have now, with the locale specific
subfolders, and add some kind of 'Manage Fonts' dialogue that will
allow to add/remove fonts from this folder. We do not have to copy
fonts in there, we can just let the user to symlink fonts he/she has
got installed somewhere else. I think the Windows 'Install fonts'
dialogue would be a pretty good model for this.

The most awkward part of implementing the dialogue will be the
need to update the fonts.scale file. For that we will need a utility
that can create the XLFD from a pfa/pfb or ttf file. I believe ttmkfdir
can do that, but it generates multiple entries for ttf fonts, which AW
does not handle correctly (this needs to be fixed at some point
too), and so the output requires subsequent hand tuning. Someone
else will need to look into this, I would like to get back to the work
on the BiDi stuff.

Tomas

*********************************************
tomas@frydrych.net / www.frydrych.net
PGP keys: http://www.frydrych.net/contact.html



This archive was generated by hypermail 2b25 : Tue Feb 20 2001 - 12:26:22 CST