diff options
author | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-08 03:22:47 +0000 |
---|---|---|
committer | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-08 03:22:47 +0000 |
commit | 325fefd82050008ce6fc573927c2f12a202e6664 (patch) | |
tree | 90fcb0db0c29367668b8cbf3acadc4c31c2cefb2 /webkit | |
parent | 76a010b47593d41d1d443dacc51bc906689c2e53 (diff) | |
download | chromium_src-325fefd82050008ce6fc573927c2f12a202e6664.zip chromium_src-325fefd82050008ce6fc573927c2f12a202e6664.tar.gz chromium_src-325fefd82050008ce6fc573927c2f12a202e6664.tar.bz2 |
A fix for Issue 5139 "some plane-1 characters are not displayed correctly".
The WebCore::UnscribeHelper::FirstGlyphForCharacter() requires a UChar offset. So, we need to increase TWO for a surrogate pair.
BUG=5139
Review URL: http://codereview.chromium.org/13163
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6500 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-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); |