After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 328374 - Pango is calculating wrong total width for mutilingual string
Pango is calculating wrong total width for mutilingual string
Status: RESOLVED OBSOLETE
Product: pango
Classification: Platform
Component: general
1.11.x
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2006-01-24 02:18 UTC by Funda Wang
Modified: 2009-01-06 12:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Funda Wang 2006-01-24 02:18:35 UTC
Pango is calculating wrong width for multilingual string, due to the fact the font used to rendering digits and punctuations varies in different context.

Check attachement#54555 for screenshot, and bug#321113#c5 for discussions.
Comment 1 Behdad Esfahbod 2006-01-24 16:05:35 UTC
Pango always calculate glyphs extents using the font that is used for rendering the glyph.

This is most probably a problem with your fonts.  I've been using this feature for years and never had this problem.
Comment 2 Funda Wang 2006-01-24 16:28:49 UTC
No. This problem can only be reproduced if the font being used is virtual font families. Every single real font is rendered perfectly.
Comment 3 Behdad Esfahbod 2006-07-27 23:34:00 UTC
The chinese ")" problem is in fact a font problem.  See:

  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=197207
Comment 4 Frederic Crozat 2006-09-11 11:07:24 UTC
this RH bug is not visible by anybody :(
Comment 5 Behdad Esfahbod 2006-09-11 14:38:20 UTC
Visible now.
Comment 6 Pablo Saratxaga 2006-11-21 16:29:32 UTC
It's not a pango bug, on gtk input boxes there is no such
cursor mispositioning.

It does happen in gecko rendering engin (so, in the text
input fields inside the web pages rendered by firefox,
galeon, etc.)

In firefox it also happens in the UI input boxes (eg the URL
toolbar input box, the google search toolbar input box, etc)
but that does not happen in galeon (which uses a gnome interface);
more likely the firefox interface renders the same way as the
gecko engine instead of trough gtk2+pango

How to reproduce it:
- launch firefox (or another gecko browser) in a chinese locale
  and go to a page with some text input fields
- type some digits: they will appear in the chinese font
- type some latin letter, the digits before them will change to
  a latin font
- now put the cursor at the begining of the line (with the digits
  and latin letters already typed to the right)
- and type some more digits: the cursors will move to the right
  based on the width of the chinese font, but the digits are
  actually displayed with the latin font.
after typing a dozen digits the cursor may be way off to the left
Comment 7 Behdad Esfahbod 2006-11-21 19:52:45 UTC
(In reply to comment #6)
> It's not a pango bug, on gtk input boxes there is no such
> cursor mispositioning.
>
> It does happen in gecko rendering engin (so, in the text
> input fields inside the web pages rendered by firefox,
> galeon, etc.)

True.  Downstream:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=211660
Comment 8 Funda Wang 2006-11-21 22:14:08 UTC
That is why I submitted bug#321113 at first. If pango is to select the same font for digits with latin letters, which is the expected behaviour, all things should be fine.