Summary: | Pango font backend unable to display japanese properly | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mike Hommey <mh+webkit> | ||||||||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | alp, marco.barisione | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | Other | ||||||||||||
OS: | Linux | ||||||||||||
Attachments: |
|
Description
Mike Hommey
2008-04-06 12:56:21 PDT
Interestingly, with LANG=ja_JP.UTF-8 and pango backend, ASCII text is displayed as garbage. I reproduced the bug with the pango back-end and it's not a WebKit bug, see http://bugzilla.gnome.org/show_bug.cgi?id=528272 (In reply to comment #2) > I reproduced the bug with the pango back-end and it's not a WebKit bug, see > http://bugzilla.gnome.org/show_bug.cgi?id=528272 That doesn't explain the text garbling for ASCII depending on locale... (In reply to comment #3) > (In reply to comment #2) > > I reproduced the bug with the pango back-end and it's not a WebKit bug, see > > http://bugzilla.gnome.org/show_bug.cgi?id=528272 > > That doesn't explain the text garbling for ASCII depending on locale... I can reproduce it only with the japanese locale, not with other non-european ones. If a font is specified using CSS everything is ok, if not you get an ugly font and wrong chars using tha pango back-end. I also tested the freetype (with debian's webkit not a revision from svn) and you get ugly fonts but the right characters. Created attachment 20579 [details]
No font is set -> junk and ugly font
Created attachment 20580 [details]
Font set -> ok
Created attachment 20581 [details] Screenshot of GtkLauncher with the wrong rendered page To reproduce it use: LANG=ja_JP.UTF-8 ./Programs/GtkLauncher https://bugs.webkit.org/attachment.cgi?id=20579 I found where the problem is but I don't know if it's a bug in pango or in our function pango_font_get_glyph() defined in WebCore/platform/graphics/gtk/GlyphPageTreeNodePango.cpp. I opened a bug in the pango bugzilla, let's see what they think: http://bugzilla.gnome.org/show_bug.cgi?id=528550 Created attachment 20629 [details]
Pass the right font to pango_shape
I didn't notice we were not passing the font to pango, so pango was returning the glyph index for another font.
Shouldn't the changelog be changed to not include the whole bug report summary, which leads to think both freetype and pango are being fixed ? BTW, shall I clone this bug and retitle both for each individual issue ? Comment on attachment 20629 [details]
Pass the right font to pango_shape
r=me
Mike: I retitled this bug to make it Pango-specific. Could you triage the current Chinese/Japanese bugs? I asked aroben to sort out bug tracker permissions for you. Thanks! Landed in r32010. |