summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-08 03:22:47 +0000
committerhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-08 03:22:47 +0000
commit325fefd82050008ce6fc573927c2f12a202e6664 (patch)
tree90fcb0db0c29367668b8cbf3acadc4c31c2cefb2 /webkit
parent76a010b47593d41d1d443dacc51bc906689c2e53 (diff)
downloadchromium_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.cpp5
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);