Index: src/ports/SkFontMgr_android.cpp |
diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp |
index e966c84f1ff4054cce84cc66ab2caf0b7a3844ef..b03185de63687beddcedf805703c705f679c2e6c 100644 |
--- a/src/ports/SkFontMgr_android.cpp |
+++ b/src/ports/SkFontMgr_android.cpp |
@@ -67,7 +67,7 @@ |
bool isFixedPitch, |
const SkString familyName, |
const SkLanguage& lang, |
- FontVariant variantStyle) |
+ uint32_t variantStyle) |
: INHERITED(index, style, isFixedPitch, familyName) |
, fPathName(pathName) |
, fLang(lang) |
@@ -88,7 +88,7 @@ |
const SkString fPathName; |
const SkLanguage fLang; |
- const FontVariant fVariantStyle; |
+ const uint32_t fVariantStyle; |
typedef SkTypeface_Android INHERITED; |
}; |
@@ -163,10 +163,11 @@ |
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. |
@@ -352,7 +353,7 @@ |
// 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) { |