Re: Unix Font Manager

Subject: Re: Unix Font Manager
From: Vlad Harchev (
Date: Sun Mar 04 2001 - 11:34:31 CST

On Sun, 4 Mar 2001, Tomas Frydrych wrote:

> I would like to implement some changes to the Unix font manager,
> but would appreciate your comments, objections and suggestions
> before I start. This what I propose to do:
> (1) Ensure that we only load pfa, pfb and ttf fonts. At the moment
> we will load anything listed in the fonts.dir files.

 Yes, that's a nice idea. But on the other hand - do efforts needed worth it?
Who may put anything other than .pfa and .pfb in fonts.dir that is read by AW?
So I think there is no much need in this.

> (2) Load only fonts with encoding suitable for the current locale. If
> the current locale uses iso-8859-8 encoding I propose to load only
> fonts registered with iso8859-8 encoding and any fonts with
> adobefontspecific encoding (because of the symbol fonts). At the
> moment we load all fonts listed in the fonts.dir files. Thus when I
> run under he_IL, I get two Arials, two Times, etc., listed in the
> combo box, one with iso-8859-1 from the root fonts directory, and
> one with iso-8859-8 from the he-IL subdirectory. Since the iso-8859-
> 1 are useless to me, if nothing else we are wasting resources.
> (3) I am going to investigate why we create and keep two separeate
> xap_UnixFont instances for each font we load, and hopefully fix
> this. I would like to look at other ways of making the font loading
> more efficient; at the moment loading Unicode ttf font takes ages
> (in tens of seconds), and a large font, such as code2000, will
> completely freeze my computer (I am not sure whether it is our
> code that is responsible for this, or whether it is the X font server
> that we wait for).

 Loading both locale-specific and generic fonts is needed under CJK locales -
AW will use fontset composed of english and CJK font for displaying. It's
because latin glyphs (that are present in CJK fonts) look much worse than
glyphs from latin1-only fonts. Due to this reason, (3) is happening AFAIR -
one xap_UnixFont is non-CJK font, other is CJK font (under non-cjk locales
these xap_UnixFonts are the same AFAIR).

 As for duplication of font entries in font selection combobox - I don't see
this on my box. AW has the code to remove fonts with duplicate names (if names
match extactly, the previously loaded font, that is latin1 only font, is
dropped). Do you really get 2 font instances in font combobox for each font?
Do members of each pair of font entries match case-sensitive or there are very
minor differencies? (if yes, one of the solutions is to make
locale-specific font names identical the names of fonts shipped with AW).

 Another point - if locale-specific fonts are not installed, and charset of
locale differs from iso-8859-1, user running AW under such locale will unable
to type anything but symbols. It seems that AW will even reject to start at
all in this situation (it checks for presence of Times font AFAIR). This is a
total loss of functionality if locale-specific fonts are not installed at all
(user may want to not install fonts, and use AW just for converting files
between different formats - say .doc to psion format).

 So, it's not that simple.

> Tomas
> *********************************************
> /
> PGP keys:

 Best regards,

This archive was generated by hypermail 2b25 : Sun Mar 04 2001 - 13:43:09 CST