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

Unified Diff: src/ports/SkFontMgr_android.cpp

Issue 1082173004: Revert of Respect declared font style on Android. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « src/ports/SkFontConfigParser_android.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontMgr_android.cpp
diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp
index d7db09bde2af5fe0a9d1819f3f2c0f595fd3f6dc..61f990c7387241a1475388ba1cd660a4be4e636a 100644
--- a/src/ports/SkFontMgr_android.cpp
+++ b/src/ports/SkFontMgr_android.cpp
@@ -143,15 +143,9 @@
continue;
}
- int weight = fontFile.fWeight != 0 ? fontFile.fWeight : style.weight();
- SkFontStyle::Slant slant;
- switch (fontFile.fStyle) {
- case FontFileInfo::Style::kAuto: slant = style.slant(); break;
- case FontFileInfo::Style::kNormal: slant = SkFontStyle::kUpright_Slant; break;
- case FontFileInfo::Style::kItalic: slant = SkFontStyle::kItalic_Slant; break;
- default: SkASSERT(false); break;
- }
- style = SkFontStyle(weight, style.width(), slant);
+ if (fontFile.fWeight != 0) {
+ style = SkFontStyle(fontFile.fWeight, style.width(), style.slant());
+ }
const SkLanguage& lang = family.fLanguage;
uint32_t variant = family.fVariant;
« no previous file with comments | « src/ports/SkFontConfigParser_android.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698