Re: Gtk 1.2.10 & Xft



"Aleksandr Koltsoff" <aleksandr koltsoff eke fi> writes:

> Hello,
> 
> Some days ago I tried to patch 1.2.10 with the Xft-patches for gtk
> (http://216.254.0.2/~bos/gtk-20010311.patch). It failed (suprise :-).
> Anyway, I backtracked few gtk versions and the last version to which this
> patch works is 1.2.9. Then I did some manual comparison and it seems that
> major failures were due to change of handling multibyte-strings within gtk.
> The files that got affected are gtk/gdk/gdkdraw.c & gdkfont.c. It seems that
> the patches are doing the counting of strlen using an internal static
> function (since 1.2.9 doesn't do that much of counting in those parts of
> code) so I see the rationale.
> 
> My question basically is:
> 
> a) how heavy modifications do I need to do into 1.2.10 to get the patch
> working (I know C, I do not know neither do the time at the moment to learn
> the innards of GDK).
> 
> b) given that a is not feasible for some reasons (which?), would using
> version 1.2.9 be a serious crime? This is the last version against which the
> patch goes smoothly against.

There were some important bug fixes between 1.2.9 and 1.2.10. 
You can find them in the ChangeLog. Whether they are important
for you or not is hard for me to judge.

You might want to try looking around some more, however, I've seen two
or three GDK + Xft patches, some more recently - in particular,
see:

 http://www.chez.com/alex9858

Which was posted to the xrender mailing list about a month ago.

> I'm sure there are hundreds of people trying to do the same thing as I am,
> which is getting Mozilla to use TrueType fonts with antialiasing (and with
> truetype-hinting instructions as well preferrably). If there are any better
> (working) solutions to this problem, I'd appreciate any hints/pointers.

I believe that the only correct way to do this is to make Mozilla use
Xft directly. The Xft font API is a lot more sane than the GDK-1.2/X11
font API, and closer to what Mozilla expects. Trying to use Xft
through the GDK in Mozilla is going to be harder than using Xft
directly (Mozilla does use Xlib font calls as well as GDK ones), and
produce inferior results.

(Converting Mozilla to use Pango/Xft would, in some ways be a superior
solution: code for things like OpenType shaping could be shared
between the two. But this would a much more major project, would
probably require changes to the layout engine, and using Pango only on
some platforms might not be feasible.)

Regards,
                                        Owen




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