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) { |