[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Problem with Fontconfig and the 9x18 bitmap font



I don't seem to be able to select the 9x18 'misc' bitmap font in
Fontconfig because it gets confused with other fonts.

The 9x18 font I'd like to use is provided by the xfonts-base package in
the four following files:

/usr/X11R6/lib/X11/fonts/misc/9x18{,B,-ISO8859-1,B-ISO8859-1}.pcf.gz

The problem is that Fontconfig assigns the same facename and same
attributes (up to 'charset' excluded) to several other fonts:

$ grep "Fixed-12:style=Regular:slant=0:weight=80:width=100:pixelsize=
  18:spacing=110:foundry=Misc:antialias=False:index=0:outline=False:s
  calable=False:dpi=100"  /usr/X11R6/lib/X11/fonts/misc/fonts.cache-1 
"18x18ja.pcf.gz" ...
"18x18ko.pcf.gz" ...
"9x18-ISO8859-1.pcf.gz" ...
"9x18.pcf.gz" ...

As Murphy's law dictates, when I ask for it I'm given the wrong one:

$ fc-match Fixed-12:pixelsize=18 
18x18ja.pcf.gz: "Fixed" "Regular"

Adding more attributes does nothing, since they have equal values.
Admittedly the 'lang' attribute of those fonts is different, but I've
not been able to use it in a fontconfig pattern to match the 9x18 font.

I'm currently using a modified  ~/.fonts.cache-1  in which I've given a
different facename to the 9x18 font, but that's clearly not a solution.

Any advice?

Can I exploit the difference in the lang attribute to match 9x18?
Is this a Fontconfig and/or xfonts-base bug?


Toby

-- 
«Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.»  —Brian W. Kernighan



Reply to: