| Index: Source/platform/fonts/win/FontCacheSkiaWin.cpp
|
| ===================================================================
|
| --- Source/platform/fonts/win/FontCacheSkiaWin.cpp (revision 183159)
|
| +++ Source/platform/fonts/win/FontCacheSkiaWin.cpp (working copy)
|
| @@ -76,7 +76,9 @@
|
|
|
| // Given the desired base font, this will create a SimpleFontData for a specific
|
| // font that can be used to render the given range of characters.
|
| -PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(const FontDescription& fontDescription, UChar32 character, const SimpleFontData*)
|
| +PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(
|
| + const FontDescription& fontDescription, UChar32 character,
|
| + const SimpleFontData* originalFontData)
|
| {
|
| // First try the specified font with standard style & weight.
|
| if (fontDescription.style() == FontStyleItalic
|
| @@ -161,6 +163,15 @@
|
| data = getFontPlatformData(fontDescription, createByFamily);
|
| }
|
|
|
| + // For font fallback we want to match the subpixel behavior of the original
|
| + // font. Mixing subpixel and non-subpixel in the same text run looks really
|
| + // odd and causes problems with preferred width calculations.
|
| + if (data && originalFontData) {
|
| + const FontPlatformData& platformData = originalFontData->platformData();
|
| + data->setMinSizeForAntiAlias(platformData.minSizeForAntiAlias());
|
| + data->setMinSizeForSubpixel(platformData.minSizeForSubpixel());
|
| + }
|
| +
|
| // When i-th font (0-base) in |panUniFonts| contains a character and
|
| // we get out of the loop, |i| will be |i + 1|. That is, if only the
|
| // last font in the array covers the character, |i| will be numFonts.
|
|
|