diff options
-rw-r--r-- | webkit/port/platform/graphics/GlyphPageTreeNodeWin.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/webkit/port/platform/graphics/GlyphPageTreeNodeWin.cpp b/webkit/port/platform/graphics/GlyphPageTreeNodeWin.cpp index ef7c0d3..709ee58 100644 --- a/webkit/port/platform/graphics/GlyphPageTreeNodeWin.cpp +++ b/webkit/port/platform/graphics/GlyphPageTreeNodeWin.cpp @@ -204,7 +204,10 @@ static bool FillNonBMPGlyphs(UChar* buffer, state.Init(); for (unsigned i = 0; i < GlyphPage::size; i++) { - WORD glyph = state.FirstGlyphForCharacter(i); + // Each character in this input buffer is a surrogate pair, which + // consists of two UChars. So, the offset for its i-th character is + // (i * 2). + WORD glyph = state.FirstGlyphForCharacter(i * 2); if (glyph) { have_glyphs = true; page->setGlyphDataForIndex(i, glyph, fontData); |