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

Re: Bug in FreeType? (normal digits rendered as old style figures with lmodern 0.99.3)



Frank Küster <frank@debian.org> wrote:

>> Unfortunately, it doesn't fix the problem with xfontsel. I am pretty
>> sure the reason is because XFree86[1] embeds an outaded FreeType copy
>> that must be used with dlopen() or something like that (it's a "module"
>> for XFree86).
> [...]
>>   [1] As well as the X.org in bpo---didn't look at the one in
>>      'unstable'.
>
> Isn't that worth a bug report?

Actually, I think this is fixed in the X.org found in 'unstable'. I
tried to find the FreeType code there. From the file, I started looking
for the source for /usr/lib/xorg/modules/fonts/libfreetype.so, which is
hw/xfree86/dixmods/ftmodule.c in xorg-server-1.0.2. But this file is
*very* short, and mostly includes a few files, among which
/usr/include/X11/fonts/fontmod.h from the libxfont-dev package. The
runtime counterpart of libxfont-dev is libxfont1 and:

% dpkg -s libxfont1
Package: libxfont1

[...]

Description: X11 font rasterisation library
 libXfont provides various services for X servers, most notably font
 selection and rasterisation (through external libraries).
 .
 More information about X.Org can be found at:
 <URL:http://xorg.freedesktop.org>
 <URL:http://lists.freedesktop.org/mailman/listinfo/xorg>

[...]

In our case, the "external library" is indeed /usr/lib/libfreetype.so.6:

% ldd /usr/lib/libXfont.so.1
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x4008c000)
        libz.so.1 => /usr/lib/libz.so.1 (0x400f8000)
        libm.so.6 => /lib/libm.so.6 (0x4010c000)
        libfontenc.so.1 => /usr/lib/libfontenc.so.1 (0x40132000)
        libc.so.6 => /lib/libc.so.6 (0x40138000)
        /lib/ld-linux.so.2 (0x80000000)

Therefore, everything looks fine in sid: the X server uses the
system-wide FreeType library, by way of libXfont. That explains why the
bug doesn't happen in sid even with xfontsel (for which the font
rendering is done on the *server* side, contrary to e.g. GNOME
applications, which are [most of the times indirectly] dynamically
linked to FreeType), altough the last upload of xserver-xorg-core (which
provides /usr/lib/xorg/modules/fonts/libfreetype.so) happened *after*
the first upload of FreeType 2.2.1 (which, as we suppose, is the first
version fixing the bug that hit the Debian archive).

In short: just wait until the X.org from 'unstable' reaches bpo. :-)

-- 
Florent



Reply to: