[patch] Hildon Pango fillFontInfo "fix"

From: Ersin Akinci <ersin.akinci_at_gmail.com>
Date: Thu Nov 12 2009 - 16:06:57 CET

This patch "fixes" a bug whereby AbiWord crashes when the user tries
to load the font chooser dialog box while having text with multiple
fonts/font styles selected. I believe that this is a very old bug,
and the code dates back to when Nokia made the first beta release of
AbiWord for OS2005 (!) Basically, AbiWord is trying to format a
string that contains Pango font information incorrectly using a space
where there should be a comma (the Pango API ref is a little ambiguous
about this: http://library.gnome.org/devel/pango/stable/pango-Fonts.html#pango-font-description-from-string),
which causes pango_context_load_font to fail.

I put "fixes" in quotes because there is a deeper underlying problem,
namely that AbiWord should not be using Hildon's standard font
selection dialog, which only allows the user to select from a preset
list of font sizes. This is fine for the internet tablet's default
apps (which are the primary target of the Hildon app framework), but
it is unacceptable for a word processor. Font sizes aside, by
preventing AbiWord from crashing, this fix brings up the dialog box
with the wrong options set so that when the user presses "OK" after
having selected text with multiple fonts the formatting on _all_ the
text changes to whatever was brought up as the default selection in
the dialog box. So if you have text with, say, Times New Roman and
Comic Sans MS, pressing font select and then immediately "OK" will
change all the text to Times New Roman whereas clearly the intended
behavior is for the font to remain the same. This is simply built
into the upstream Hildon code, so AbiWord needs a new "hildonized" GTK
widget for the font selection screen.

-Ersin

Received on Thu Nov 12 16:07:12 2009

This archive was generated by hypermail 2.1.8 : Thu Nov 12 2009 - 16:07:12 CET