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

Side by Side Diff: third_party/WebKit/WebCore/platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp

Issue 17624: Add m_isGlyphLookupMode to UniscribeHelper class and set it to true when fill... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 months 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 | third_party/WebKit/WebCore/platform/graphics/chromium/UniscribeHelper.h » ('j') | 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. All rights reserved. 1 // Copyright (c) 2008, Google Inc. All rights reserved.
2 // 2 //
3 // Redistribution and use in source and binary forms, with or without 3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are 4 // modification, are permitted provided that the following conditions are
5 // met: 5 // met:
6 // 6 //
7 // * Redistributions of source code must retain the above copyright 7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer. 8 // notice, this list of conditions and the following disclaimer.
9 // * Redistributions in binary form must reproduce the above 9 // * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer 10 // copyright notice, this list of conditions and the following disclaimer
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 GlyphPage* page, 197 GlyphPage* page,
198 const SimpleFontData* fontData) 198 const SimpleFontData* fontData)
199 { 199 {
200 bool haveGlyphs = false; 200 bool haveGlyphs = false;
201 201
202 UniscribeHelperTextRun state(buffer, length * 2, false, 202 UniscribeHelperTextRun state(buffer, length * 2, false,
203 fontData->m_font.hfont(), 203 fontData->m_font.hfont(),
204 fontData->m_font.scriptCache(), 204 fontData->m_font.scriptCache(),
205 fontData->m_font.scriptFontProperties()); 205 fontData->m_font.scriptFontProperties());
206 state.setInhibitLigate(true); 206 state.setInhibitLigate(true);
207 state.setDisableFontFallback(true);
207 state.Init(); 208 state.Init();
208 209
209 for (unsigned i = 0; i < length; i++) { 210 for (unsigned i = 0; i < length; i++) {
210 // Each character in this input buffer is a surrogate pair, which 211 // Each character in this input buffer is a surrogate pair, which
211 // consists of two UChars. So, the offset for its i-th character is 212 // consists of two UChars. So, the offset for its i-th character is
212 // (i * 2). 213 // (i * 2).
213 WORD glyph = state.FirstGlyphForCharacter(i * 2); 214 WORD glyph = state.FirstGlyphForCharacter(i * 2);
214 if (glyph) { 215 if (glyph) {
215 haveGlyphs = true; 216 haveGlyphs = true;
216 page->setGlyphDataForIndex(offset + i, glyph, fontData); 217 page->setGlyphDataForIndex(offset + i, glyph, fontData);
(...skipping 23 matching lines...) Expand all
240 // because each character in the non-BMP input buffer will be 241 // because each character in the non-BMP input buffer will be
241 // represented by a surrogate pair (two UChar's). 242 // represented by a surrogate pair (two UChar's).
242 return fillNonBMPGlyphs(offset, length, characterBuffer, 243 return fillNonBMPGlyphs(offset, length, characterBuffer,
243 this, fontData); 244 this, fontData);
244 } 245 }
245 ASSERT_NOT_REACHED(); 246 ASSERT_NOT_REACHED();
246 return false; 247 return false;
247 } 248 }
248 249
249 } // namespace WebCore 250 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/WebCore/platform/graphics/chromium/UniscribeHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698