Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: webkit/port/platform/graphics/GlyphPageTreeNodeWin.cpp

Issue 13163: A fix for Issue 5139 "some plane-1 characters are not displayed correctly".... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008, Google Inc. 1 // Copyright (c) 2008, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 bool have_glyphs = false; 197 bool have_glyphs = false;
198 198
199 UniscribeHelperTextRun state(buffer, GlyphPage::size * 2, false, 199 UniscribeHelperTextRun state(buffer, GlyphPage::size * 2, false,
200 fontData->m_font.hfont(), 200 fontData->m_font.hfont(),
201 fontData->m_font.scriptCache(), 201 fontData->m_font.scriptCache(),
202 fontData->m_font.scriptFontProperties()); 202 fontData->m_font.scriptFontProperties());
203 state.setInhibitLigate(true); 203 state.setInhibitLigate(true);
204 state.Init(); 204 state.Init();
205 205
206 for (unsigned i = 0; i < GlyphPage::size; i++) { 206 for (unsigned i = 0; i < GlyphPage::size; i++) {
207 WORD glyph = state.FirstGlyphForCharacter(i); 207 // Each character in this input buffer is a surrogate pair, which
208 // consists of two UChars. So, the offset for its i-th character is
209 // (i * 2).
210 WORD glyph = state.FirstGlyphForCharacter(i * 2);
208 if (glyph) { 211 if (glyph) {
209 have_glyphs = true; 212 have_glyphs = true;
210 page->setGlyphDataForIndex(i, glyph, fontData); 213 page->setGlyphDataForIndex(i, glyph, fontData);
211 } else { 214 } else {
212 // Clear both glyph and fontData fields. 215 // Clear both glyph and fontData fields.
213 page->setGlyphDataForIndex(i, 0, 0); 216 page->setGlyphDataForIndex(i, 0, 0);
214 } 217 }
215 } 218 }
216 return have_glyphs; 219 return have_glyphs;
217 } 220 }
(...skipping 13 matching lines...) Expand all
231 return FillBMPGlyphs(characterBuffer, this, fontData, true); 234 return FillBMPGlyphs(characterBuffer, this, fontData, true);
232 } else if (bufferLength == GlyphPage::size * 2) { 235 } else if (bufferLength == GlyphPage::size * 2) {
233 return FillNonBMPGlyphs(characterBuffer, this, fontData); 236 return FillNonBMPGlyphs(characterBuffer, this, fontData);
234 } else { 237 } else {
235 // TODO: http://b/1007391 make use of offset and length 238 // TODO: http://b/1007391 make use of offset and length
236 return false; 239 return false;
237 } 240 }
238 } 241 }
239 242
240 } 243 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698