XListFonts vs. XListFontsWithInfo

Dimitry Golubovsky golubovsky at gmail.com
Fri Dec 16 11:01:58 PST 2005


Under what circumstances may XListFontsWithInfo not return as many
font names as XListFonts does on the same pattern?

I have XFree86 3.3.something (I know, that's old, so maybe this is a
known bug fixed later), and XFSTT serving TrueType fonts; all under
Linux. These font names would match the '-ttf-* (all stars)' pattern.

It can be seen in the xlsfonts sources that depending on the verbosity
(-l, -ll, -lll) it acts differently:

with '-l' it uses XListFontsWithInfo, otherwise XListFonts, and then
for the long listing it performs XLoadQueryFont for each font name.

Running xlsfonts with strace confirms this: request code varies
depending on the -l option.

When I try to run xlsfonts supplying the pattern for my TTF fonts,
depending on which Xlib function it uses, results are different: when
XListFonts is used, it reports correct list of fonts; when
XListFontsWithInfo is used nothing is returned.

Is this a known bug, perhaps on the server side,  or some kind of
expected behavior for fonts served externally?

PS I am blaming the server side because strace does not show long
reply form the server as it might be expected when XListFontsWithInfo
is used.

PPS XLoadFont opens matching fonts correctly with the same pattern, so
it is only XListFontsWithInfo from which I cannot get the information
I need.

Thanks.
--
Dimitry Golubovsky

Anywhere on the Web


More information about the xorg mailing list