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

Side by Side Diff: Source/platform/fonts/win/FontFallbackWin.cpp

Issue 1327143002: Make sure getFallbackFamily() always sets *scriptChecked. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Created 5 years, 3 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
« 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 /* 1 /*
2 * Copyright (c) 2006, 2007, 2008, 2009, 2010, 2012 Google Inc. All rights reser ved. 2 * Copyright (c) 2006, 2007, 2008, 2009, 2010, 2012 Google Inc. All rights reser ved.
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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 // - All the characters (or characters up to the point a single 397 // - All the characters (or characters up to the point a single
398 // font can cover) need to be taken into account 398 // font can cover) need to be taken into account
399 const UChar* getFallbackFamily(UChar32 character, 399 const UChar* getFallbackFamily(UChar32 character,
400 FontDescription::GenericFamilyType generic, 400 FontDescription::GenericFamilyType generic,
401 UScriptCode* scriptChecked, 401 UScriptCode* scriptChecked,
402 SkFontMgr* fontManager) 402 SkFontMgr* fontManager)
403 { 403 {
404 ASSERT(character); 404 ASSERT(character);
405 ASSERT(fontManager); 405 ASSERT(fontManager);
406 const UChar* family = getFontBasedOnUnicodeBlock(character, fontManager); 406 const UChar* family = getFontBasedOnUnicodeBlock(character, fontManager);
407 if (family) 407 if (family) {
408 if (scriptChecked)
409 *scriptChecked = USCRIPT_INVALID_CODE;
408 return family; 410 return family;
411 }
409 412
410 UScriptCode script = getScript(character); 413 UScriptCode script = getScript(character);
411 414
412 // For the full-width ASCII characters (U+FF00 - U+FF5E), use the font for 415 // For the full-width ASCII characters (U+FF00 - U+FF5E), use the font for
413 // Han (determined in a locale-dependent way above). Full-width ASCII 416 // Han (determined in a locale-dependent way above). Full-width ASCII
414 // characters are rather widely used in Japanese and Chinese documents and 417 // characters are rather widely used in Japanese and Chinese documents and
415 // they're fully covered by Chinese, Japanese and Korean fonts. 418 // they're fully covered by Chinese, Japanese and Korean fonts.
416 if (0xFF00 < character && character < 0xFF5F) 419 if (0xFF00 < character && character < 0xFF5F)
417 script = USCRIPT_HAN; 420 script = USCRIPT_HAN;
418 421
(...skipping 26 matching lines...) Expand all
445 family = L"lucida sans unicode"; 448 family = L"lucida sans unicode";
446 } 449 }
447 } 450 }
448 451
449 if (scriptChecked) 452 if (scriptChecked)
450 *scriptChecked = script; 453 *scriptChecked = script;
451 return family; 454 return family;
452 } 455 }
453 456
454 } // namespace blink 457 } // namespace blink
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