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

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

Issue 1682103004: Add FontCache::acceptLanguagesChanged() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tkent review Created 4 years, 10 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } else { 105 } else {
106 fontManager = SkFontMgr_New_GDI(); 106 fontManager = SkFontMgr_New_GDI();
107 // Subpixel text positioning is not supported by the GDI backend. 107 // Subpixel text positioning is not supported by the GDI backend.
108 s_useSubpixelPositioning = false; 108 s_useSubpixelPositioning = false;
109 } 109 }
110 110
111 ASSERT(fontManager); 111 ASSERT(fontManager);
112 m_fontManager = adoptPtr(fontManager); 112 m_fontManager = adoptPtr(fontManager);
113 } 113 }
114 114
115 void FontCache::acceptLanguagesChanged(const String&)
116 {
117 // TODO(kojii): Take acceptLanguages into account for ambiguos scripts.
118 }
115 119
116 // Given the desired base font, this will create a SimpleFontData for a specific 120 // Given the desired base font, this will create a SimpleFontData for a specific
117 // font that can be used to render the given range of characters. 121 // font that can be used to render the given range of characters.
118 PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter( 122 PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(
119 const FontDescription& fontDescription, UChar32 character, 123 const FontDescription& fontDescription, UChar32 character,
120 const SimpleFontData* originalFontData) 124 const SimpleFontData* originalFontData)
121 { 125 {
122 // First try the specified font with standard style & weight. 126 // First try the specified font with standard style & weight.
123 if (fontDescription.style() == FontStyleItalic 127 if (fontDescription.style() == FontStyleItalic
124 || fontDescription.weight() >= FontWeightBold) { 128 || fontDescription.weight() >= FontWeightBold) {
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 if (typefacesMatchesFamily(tf.get(), family)) { 424 if (typefacesMatchesFamily(tf.get(), family)) {
421 result->setMinSizeForSubpixel(minSizeForSubpixelForFont); 425 result->setMinSizeForSubpixel(minSizeForSubpixelForFont);
422 break; 426 break;
423 } 427 }
424 } 428 }
425 429
426 return result.release(); 430 return result.release();
427 } 431 }
428 432
429 } // namespace blink 433 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698