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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp

Issue 1607943004: Change the system font fallback to take lang attributes into account on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix TestExpectations for the new test Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Computer, Inc. 2 * Copyright (C) 2006, 2007 Apple Computer, Inc.
3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved. 3 * Copyright (c) 2006, 2007, 2008, 2009, 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 { 121 {
122 // First try the specified font with standard style & weight. 122 // First try the specified font with standard style & weight.
123 if (fontDescription.style() == FontStyleItalic 123 if (fontDescription.style() == FontStyleItalic
124 || fontDescription.weight() >= FontWeightBold) { 124 || fontDescription.weight() >= FontWeightBold) {
125 RefPtr<SimpleFontData> fontData = fallbackOnStandardFontStyle( 125 RefPtr<SimpleFontData> fontData = fallbackOnStandardFontStyle(
126 fontDescription, character); 126 fontDescription, character);
127 if (fontData) 127 if (fontData)
128 return fontData; 128 return fontData;
129 } 129 }
130 130
131 // FIXME: Consider passing fontDescription.dominantScript()
132 // to GetFallbackFamily here.
133 UScriptCode script; 131 UScriptCode script;
134 const wchar_t* family = getFallbackFamily(character, 132 const wchar_t* family = getFallbackFamily(character,
135 fontDescription.genericFamily(), 133 fontDescription.genericFamily(),
134 fontDescription.script(),
135 fontDescription.locale(),
136 &script, 136 &script,
137 m_fontManager.get()); 137 m_fontManager.get());
138 FontPlatformData* data = 0; 138 FontPlatformData* data = 0;
139 if (family) { 139 if (family) {
140 FontFaceCreationParams createByFamily(AtomicString(family, wcslen(family ))); 140 FontFaceCreationParams createByFamily(AtomicString(family, wcslen(family )));
141 data = getFontPlatformData(fontDescription, createByFamily); 141 data = getFontPlatformData(fontDescription, createByFamily);
142 } 142 }
143 143
144 // Last resort font list : PanUnicode. CJK fonts have a pretty 144 // Last resort font list : PanUnicode. CJK fonts have a pretty
145 // large repertoire. Eventually, we need to scan all the fonts 145 // large repertoire. Eventually, we need to scan all the fonts
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 if (typefacesMatchesFamily(tf.get(), family)) { 420 if (typefacesMatchesFamily(tf.get(), family)) {
421 result->setMinSizeForSubpixel(minSizeForSubpixelForFont); 421 result->setMinSizeForSubpixel(minSizeForSubpixelForFont);
422 break; 422 break;
423 } 423 }
424 } 424 }
425 425
426 return result.release(); 426 return result.release();
427 } 427 }
428 428
429 } // namespace blink 429 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698