[Fontconfig] fontconfig and xfonts?

John A. Boyd Jr. jaboydjr at netwalk.com
Fri Jan 23 09:36:32 EST 2004

The specific fix is to delete the unwanted font; there is a more
general problem, however, with a more general fix.  See my message of
11/24/03 to this list, and the attached patches (which may be out of
date by now; I never got a single response).  I'll attach an excerpt
below, for your convenience.

The more general problem is that particular XLFD attributes, notably
'set width', are not preserved.  Fonts that differ only in this
attribute are thus selected arbitrarily.  The patches I submited to
this list and elsewhere resolve these ambiquities by preserving
the set-width attribute in a flexible way (look at the patches for
more details; I did this a few months ago now).

Consider the fonts in question.  7x13 and 6x13 have the following


They differ only in the "set width" attribute.  If it is not
preserved in some way by fontconfig and other font-processing
utilities, the choice becomes ambiguous (or impossible, if "normal"
is forced and, e.g., semicondensed was desired).  Which is highly
unfortunate, since 6x13 is the longstanding X 'fixed' font via
alias, which people like myself have come to love.

Where 'fontconfig' is concerned, these patches carry non-'normal'
'set width' in the 'style' element of a pattern.  They coordinate
this usage with the other packages used by GNOME (Pango, Freetype,
...), which are patched to do similarly flexible things with the
information.  (Werner Lemberg, a Freetype maintainer, patched
Freetype's CVS some time ago now.)

I would hope that someone involved in maintaining fontconfig and
the related packages, would look into this issue, and specifically
into adopting the patches I submitted.  I've only read this list once
month or so; maybe the maintainers only read it infrequently as well.

I should emphasize that these patches do resolve the problem, for
those libraries and applications patched.  Other apps or libraries
that I'm not using may require similar patching (to take advantage
of the information not otherwise available).

An excerpt from my original post follows:

John A. Boyd Jr. wrote:
 > ...
 > In the process of upgrading to Gnome 2.4 from sources, I encountered a
 > problem I had dealt with before that had not yet been addressed.  These
 > patches collectively address it.  The problem is that the standard X
 > font aliased as "fixed", i.e., 6x13.[pcf,bdf], would not be visible to
 > all the newer font-handling utilities if 7x13 was also available - the
 > two fonts look the same because the "SemiCondensed" set-width was not
 > at all being handled.
 > The solution these patches implement is to pass the PCF/BDF set-width
 > name (and optionally the add-style name) field(s) as part of the style
 > strings used by various other packages (i.e., FreeType, fontconfig,
 > Xft, and Pango), and to deal with this additional information
 > appropriately, and as generally as I could imagine and achieve in short
 > order.
 > Also included here are patches for vte and gtk, which make use of the
 > other patches.  I suspect, however, that none of these patches depend
 > on the others, in the respect that a supporting package must be patched
 > before a using package.  E.g., Gnome's font-picker dialog also makes
 > use of the changes, but requires no patching to do so.
 >  ...
 > If anyone reading this message could be of assistance in forwarding
 > the remaining patches to the appropriate maintainers, I would appreciate
 > it, by the way... 8^)

Frank Murphy wrote:
> On Tuesday 11 November 2003 8:06, Vaidotas Zemlys wrote:
>>I had this problem for a long time. Then one day I got really upset and
>>figured out which font fontconfig chooses instead of my beloved fixed font.
>>As it turns out it was 12x13ja.pcf. (The ugly font in the bottom) So I
>>manually removed it from my system. Here how it goes:
>>cd /usr/lib/X11/fonts/misc
>>rm 12x13ja.pcf.gz
>>update-fonts-dir misc
>>And voila now there is no problem choosing fixed font in gnome. It is not
>>nice solution, I have to do it everytime X window system is updated (or
>>only fonts), yet not one of the solutions provided on this list (there were
>>some) provided me with the same results. In my case I did not manage to
>>force fontconfig to choose font:
>>7x13 or
>>w>>7x13         -misc-fixed-medium-r-normal--13-120-75-75-c-70-iso8859-13
> Thank you for this! I've been frustrated by getting this big, ugly font for 
> fixed in KDE's konsole for a long time as well. While your workaround is not 
> perfect, it does fix the problem for me. Thanks!
> Have you filed a bug on this in Debian? And how did you track down which font 
> was the problem?
> Frank
> _______________________________________________
> Fontconfig mailing list
> Fontconfig at fontconfig.org
> http://fontconfig.org/mailman/listinfo/fontconfig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: addstyle-patches.tar.gz
Type: application/x-gzip
Size: 12763 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20040122/c950e0ac/addstyle-patches.tar.bin

More information about the Fontconfig mailing list