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

Unified Diff: third_party/WebKit/Source/core/css/LocalFontFaceSource.cpp

Issue 2721613002: Fix matching Roboto Bold for src: local("Roboto Regular") (Closed)
Patch Set: Fix test case for Mac Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/LocalFontFaceSource.cpp
diff --git a/third_party/WebKit/Source/core/css/LocalFontFaceSource.cpp b/third_party/WebKit/Source/core/css/LocalFontFaceSource.cpp
index 51bafcc32ff087b7bcb4a06f3c763a2f512b189c..44e718763c1f5bf03ca098625b7d9199aaee7e4a 100644
--- a/third_party/WebKit/Source/core/css/LocalFontFaceSource.cpp
+++ b/third_party/WebKit/Source/core/css/LocalFontFaceSource.cpp
@@ -13,16 +13,14 @@ namespace blink {
bool LocalFontFaceSource::isLocalFontAvailable(
const FontDescription& fontDescription) {
- return FontCache::fontCache()->isPlatformFontAvailable(fontDescription,
- m_fontName);
+ return FontCache::fontCache()->isPlatformFontUniqueNameMatchAvailable(
+ fontDescription, m_fontName);
}
PassRefPtr<SimpleFontData> LocalFontFaceSource::createFontData(
const FontDescription& fontDescription) {
- // We don't want to check alternate font family names here, so pass true as
- // the checkingAlternateName parameter.
RefPtr<SimpleFontData> fontData = FontCache::fontCache()->getFontData(
- fontDescription, m_fontName, AlternateFontName::NoAlternate);
+ fontDescription, m_fontName, AlternateFontName::LocalUniqueFace);
m_histograms.record(fontData.get());
return fontData.release();
}
« no previous file with comments | « third_party/WebKit/Source/core/css/FontFaceSet.cpp ('k') | third_party/WebKit/Source/platform/fonts/FontCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698