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

Unified Diff: Source/platform/fonts/skia/FontCacheSkia.cpp

Issue 387873002: For font weights >= 600, create bold system fonts. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reupload woes Created 6 years, 5 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: Source/platform/fonts/skia/FontCacheSkia.cpp
diff --git a/Source/platform/fonts/skia/FontCacheSkia.cpp b/Source/platform/fonts/skia/FontCacheSkia.cpp
index da3d4ed64d3130f6564f1cef0964d4236517bfd1..a21fed4868ed198bd524c2879bc372cb115478d9 100644
--- a/Source/platform/fonts/skia/FontCacheSkia.cpp
+++ b/Source/platform/fonts/skia/FontCacheSkia.cpp
@@ -76,7 +76,7 @@ PassRefPtr<SimpleFontData> FontCache::fallbackOnStandardFontStyle(
FontPlatformData* substitutePlatformData = getFontPlatformData(substituteDescription, creationParams);
if (substitutePlatformData && substitutePlatformData->fontContainsCharacter(character)) {
FontPlatformData platformData = FontPlatformData(*substitutePlatformData);
- platformData.setSyntheticBold(fontDescription.weight() >= FontWeightBold);
+ platformData.setSyntheticBold(fontDescription.weight() >= FontWeight600);
platformData.setSyntheticItalic(fontDescription.style() == FontStyleItalic);
return fontDataFromFontPlatformData(&platformData, DoNotRetain);
}
@@ -89,7 +89,7 @@ PassRefPtr<SimpleFontData> FontCache::fallbackFontForCharacter(const FontDescrip
{
// First try the specified font with standard style & weight.
if (fontDescription.style() == FontStyleItalic
- || fontDescription.weight() >= FontWeightBold) {
+ || fontDescription.weight() >= FontWeight600) {
RefPtr<SimpleFontData> fontData = fallbackOnStandardFontStyle(
fontDescription, c);
if (fontData)
@@ -182,7 +182,7 @@ PassRefPtr<SkTypeface> FontCache::createTypeface(const FontDescription& fontDesc
}
int style = SkTypeface::kNormal;
- if (fontDescription.weight() >= FontWeightBold)
+ if (fontDescription.weight() >= FontWeight600)
style |= SkTypeface::kBold;
if (fontDescription.style())
style |= SkTypeface::kItalic;
@@ -213,7 +213,7 @@ FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontD
FontPlatformData* result = new FontPlatformData(tf,
name.data(),
fontSize,
- (fontDescription.weight() >= FontWeightBold && !tf->isBold()) || fontDescription.isSyntheticBold(),
+ (fontDescription.weight() >= FontWeight600 && !tf->isBold()) || fontDescription.isSyntheticBold(),
(fontDescription.style() && !tf->isItalic()) || fontDescription.isSyntheticItalic(),
fontDescription.orientation(),
fontDescription.useSubpixelPositioning());

Powered by Google App Engine
This is Rietveld 408576698