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

Unified Diff: src/ports/SkFontMgr_android.cpp

Issue 450513002: Revert "Remove SkPaintOptionsAndroid" (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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') | tests/AndroidPaintTest.cpp » ('j') | 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 7ce7cb09b6363cd967c5b132fe382399054d5d28..1ab2f29642a1147be1bc0404e43faf951f3af113 100644
--- a/src/ports/SkFontMgr_android.cpp
+++ b/src/ports/SkFontMgr_android.cpp
@@ -61,7 +61,7 @@ public:
bool isFixedPitch,
const SkString familyName,
const SkLanguage& lang,
- FontVariant variantStyle)
+ uint32_t variantStyle)
: INHERITED(index, style, isFixedPitch, familyName)
, fPathName(pathName)
, fLang(lang)
@@ -82,7 +82,7 @@ public:
const SkString fPathName;
const SkLanguage fLang;
- const FontVariant fVariantStyle;
+ const uint32_t fVariantStyle;
typedef SkTypeface_Android INHERITED;
};
@@ -153,10 +153,11 @@ public:
continue;
}
- const SkLanguage& lang = family.fLanguage;
- uint32_t variant = family.fVariant;
- if (kDefault_FontVariant == variant) {
- variant = kCompact_FontVariant | kElegant_FontVariant;
+ const SkLanguage& lang = fontFile.fPaintOptions.getLanguage();
+ uint32_t variant = fontFile.fPaintOptions.getFontVariant();
+ if (SkPaintOptionsAndroid::kDefault_Variant == variant) {
+ variant = SkPaintOptionsAndroid::kCompact_Variant |
+ SkPaintOptionsAndroid::kElegant_Variant;
}
// The first specified family name overrides the family name found in the font.
@@ -334,7 +335,7 @@ protected:
// TODO: add 'is_elegant' and 'is_compact' bits to 'style' request.
// For compatibility, try 'elegant' fonts first in fallback.
- uint32_t variantMask = kElegant_FontVariant;
+ uint32_t variantMask = SkPaintOptionsAndroid::kElegant_Variant;
// The first time match anything in the mask, second time anything not in the mask.
for (bool maskMatches = true; maskMatches != false; maskMatches = false) {
« no previous file with comments | « src/ports/SkFontConfigParser_android.cpp ('k') | tests/AndroidPaintTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698