Re: [Gnome-print] gdf_find_measured_gdk_font: proposed way to fixsevere i18n bug



Hello!

OK. I applied your changes. Hope everything will work ;-)

Best wishes,
Lauris Kaplinski

On Tue, 2001-09-25 at 14:31, Vlad Harchev wrote:
> 
>  Hello, 
> 
>  gnome-rfont.c:gdf_find_measured_gdk_font is currently used internally to
> find find out the X font that matches the given printer font as close as
> possible. It tries to build an XLFD of the font with a lot of "*" in it, and
> asks X server (by calling gdk_font_load) to load some font that has such XLFD.
> Among other parts of XLFD that are set to '*' is the registry-encoding pair.
> This means that X will return font with ANY encoding!! And it really DOES!
> E.g. in gnumeric, the text in cells is drawn with the font with random encoding,
> text fragments of the same font family, size and weight are drawn using same
> font, but when e.g. style or size or weight is changed for some fragment,
> it may be redrawn with the font with different encoding (think about russian
> text drawn with iso1 font). This of course makes apps that use gnome-print
> unusable (user just can't read what they type right now or what they typed
> in other cell).
> 
>  There is a solution to this problem - just
>     sed -e 's/gdk_font_load/gdk_fontset_load/g' gnome-rfont.c 
> This really fixes that problem - X i18n machinery will care to return only
> fonts with the current locale's encoding. This means fonts with wrong encoding
> will never be returned by gdf_find_measured_gdk_font().
>  Also it fixes other i18n problems (CJK fonts can be used iff they are loaded
> using gdk_fontset_load, they won't work if you use gdk_font_load).
> 
>  Could you please make this modification to gnome-rfont.c?
> 
>  Best regards,
>   -Vlad
> 
> 
> _______________________________________________
> Gnome-print maillist  -  Gnome-print@ximian.com
> http://lists.ximian.com/mailman/listinfo/gnome-print






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