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 560914 - Text areas in gecko are wider in Japanese locale
Text areas in gecko are wider in Japanese locale
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.22.x
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2008-11-15 13:09 UTC by Josselin Mouette
Modified: 2009-01-06 12:17 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Josselin Mouette 2008-11-15 13:09:45 UTC
This bug was originally reported on the Debian BTS: http://bugs.debian.org/505780
There are (ugly) screenshots if you find my explanations unclear.

Compared to pango 1.20, version 2.22 seems to compute correctly the width required to type a text in a given language for a given size. The result is, in Firefox, that the text input field is now wider when you use a Japanese locale (or any locale where the average character width is large).

I see this as an improvement, the problem is that websites don’t bother to reduce the width of their input fields depending on the language, even if a typical query in Japanese is half the number of characters of an English one. For example Google always uses a width of 55.

(Even worse is the fact that Gecko relies on the system locale and not the webpage’s one, but this is not an issue in pango itself.)
Comment 1 Behdad Esfahbod 2009-01-06 12:17:41 UTC
Fixed for a while:

2008-12-05  Behdad Esfahbod  <behdad@gnome.org>

        Bug 563356 – The input area of firefox and the blank width after text
        in gnome-menu was stretched too wide, under pango-1.22.3

        * docs/tmpl/fonts.sgml:
        * pango/pango-impl-utils.h:
        * pango/pangocairo-atsuifont.c
        (pango_cairo_atsui_font_create_metrics_for_context):
        * pango/pangocairo-win32font.c
        (pango_cairo_win32_font_create_metrics_for_context):
        * pango/pangofc-font.c (pango_fc_font_create_metrics_for_context):
        For approximate_char_width calculation take each char's width into
        account.  That is, do a weighted average instead of uniform average.
        g_unichar_iszerowidth() chars count as 0, g_unichar_iswide() chars
        count 2, and the rest count as 1.  Pretty much wcwidth() behavior.
        See bug report for rationale.