Commit f398cfd9 authored by alp@webkit.org's avatar alp@webkit.org
Browse files

2008-04-17 Marco Barisione <marco.barisione@collabora.co.uk>

        Reviewed by Alp Toker.

        http://bugs.webkit.org/show_bug.cgi?id=18335
        Pango font backend unable to display japanese properly

        Different fonts can have different glyph indices, so we need to pass
        the right font when retrieving a glyph index.

        * platform/graphics/gtk/GlyphPageTreeNodePango.cpp:
        (WebCore::pango_font_get_glyph): Temporarily override the font in the
        PangoAnalysis passed to pango_shape.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c1870e6f
2008-04-17 Marco Barisione <marco.barisione@collabora.co.uk>
Reviewed by Alp Toker.
http://bugs.webkit.org/show_bug.cgi?id=18335
Pango font backend unable to display japanese properly
Different fonts can have different glyph indices, so we need to pass
the right font when retrieving a glyph index.
* platform/graphics/gtk/GlyphPageTreeNodePango.cpp:
(WebCore::pango_font_get_glyph): Temporarily override the font in the
PangoAnalysis passed to pango_shape.
2008-04-17 Anders Carlsson <andersca@apple.com>
 
According to Sam and David, it's "topLevel", not "toplevel".
......@@ -48,9 +48,14 @@ static PangoGlyph pango_font_get_glyph(PangoFont* font, PangoContext* context, g
GList* items = pango_itemize(context, buffer, 0, length, NULL, NULL);
if (g_list_length(items) == 1) {
PangoItem* item = reinterpret_cast<PangoItem*>(items->data);
PangoFont* tmpFont = item->analysis.font;
item->analysis.font = font;
PangoGlyphString* glyphs = pango_glyph_string_new();
pango_shape(buffer, length, &item->analysis, glyphs);
pango_shape(buffer, length, &((PangoItem*)items->data)->analysis, glyphs);
item->analysis.font = tmpFont;
if (glyphs->num_glyphs == 1)
result = glyphs->glyphs[0].glyph;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment