Re: [Gnome-print] [PATCH] fix big i18n problem in gnome-rfont.c
- From: Vlad Harchev <hvv hippo ru>
- To: Lauris Kaplinski <lauris ximian com>
- cc: gnome-print helixcode com, chema ximian com
- Subject: Re: [Gnome-print] [PATCH] fix big i18n problem in gnome-rfont.c
- Date: Fri, 9 Mar 2001 21:33:31 +0400 (SAMT)
On 9 Mar 2001, Lauris Kaplinski wrote:
Hi,
> Hello!
> On 09 Mar 2001 17:34:53 +0400, Vlad Harchev wrote:
> > On Fri, 9 Mar 2001, Vlad Harchev wrote:
> >
> > Hi Lautis,
> >
> > Unfortunately I have a reason to complain about support of i18n in
> > gnome-print :(
> >
> > Two points:
> > 1) pdfs generated by gnome-print with russian in them can't be opened by xpdf,
> > gs and acroread. I can supply samples.
>
> Hmmm....
> It seems to me that PDF-s generated by gnome-print cannot be opened by xpdf
> regardless of codeset :(
> Maybe chema (the author of pdf driver) can help us here...
Hmm, at least the ones producded by printing from Gnumeric (with latin text
in only one cell, with header and footer with latin in them) seem to work with
xpdf.
> > 2) It seems there is no way to get string width for utf8 string - function
> > gnome_font_get_width_string calls gnome_font_get_width_string_n that
> > measures the width of each byte (treating each byte as a character) in
> > that string. I had to resort to converting string to wchar_t[] and
> > sum the values returned by the following, looping on 'i':
> >
> > gnome_font_get_glyph_width(font, gnome_font_lookup_default(font, wcs[i]) );
>
> Aha!
> Thank you for finding that!
> Btw. does gnumeric use that broken function?
Gnumeric used it before my patch. After my patch, a loop on all wide chars
gnome_font_get_glyph_width(font, gnome_font_lookup_default(font, wcs[i]) );
is used to measure string width.
> I am afraid that correcting that will reveal the dependancy of many programs on
> given broken behaviour - but that's life. So I'll fix it now, and try to find out,
> which programs will break.
Yes, I also afraid that it can break a lot of software. May be an explicit
utf8-accepting function should be added to gnome-print, named something like
gnome_font_get_width_string_utf8?
> Lauris
>
Best regards,
-Vlad
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]