| Index: third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp
|
| diff --git a/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp b/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp
|
| index be0a9b728573cad2b388ccfe86dc650e7dd101a1..d9a669248ace5ceca13f802ca9793dfa30d910d5 100644
|
| --- a/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp
|
| +++ b/third_party/WebKit/Source/platform/fonts/win/FontCacheSkiaWin.cpp
|
| @@ -347,6 +347,20 @@ std::unique_ptr<FontPlatformData> FontCache::createFontPlatformData(
|
| FontWeight variantWeight;
|
| FontStretch variantStretch;
|
|
|
| + // TODO: crbug.com/627143 LocalFontFaceSource.cpp, which implements
|
| + // retrieving src: local() font data uses getFontData, which in turn comes
|
| + // here, to retrieve fonts from the cache and specifies the argument to
|
| + // local() as family name. So we do not match by full font name or
|
| + // postscript name as the spec says:
|
| + // https://drafts.csswg.org/css-fonts-3/#src-desc
|
| +
|
| + // Prevent one side effect of the suffix translation below where when
|
| + // matching local("Roboto Regular") it tries to find the closest match even
|
| + // though that can be a bold font in case of Roboto Bold.
|
| + if (alternateFontName == AlternateFontName::LocalUniqueFace) {
|
| + return nullptr;
|
| + }
|
| +
|
| if (alternateFontName == AlternateFontName::LastResort) {
|
| if (!tf)
|
| return nullptr;
|
|
|