Index: src/ports/SkFontHost_fontconfig.cpp |
diff --git a/src/ports/SkFontHost_fontconfig.cpp b/src/ports/SkFontHost_fontconfig.cpp |
index 591e9d5aed682fb851255d6f45082df856ad62da..aaee67a74e328687ef8fce10ae293972f696cc6c 100644 |
--- a/src/ports/SkFontHost_fontconfig.cpp |
+++ b/src/ports/SkFontHost_fontconfig.cpp |
@@ -85,9 +85,10 @@ SkTypeface* FontConfigTypeface::LegacyCreateTypeface( |
return NULL; |
} |
+ SkString familyFaceName; |
if (familyFace) { |
bungeman-skia
2015/02/18 21:05:49
It turns out we never actually come down this path
|
- FontConfigTypeface* fct = (FontConfigTypeface*)familyFace; |
- familyName = fct->getFamilyName(); |
+ familyFace->getFamilyName(&familyFaceName); |
+ familyName = familyFaceName.c_str(); |
} |
SkFontStyle requestedStyle(style); |
@@ -144,12 +145,14 @@ SkStreamAsset* FontConfigTypeface::onOpenStream(int* ttcIndex) const { |
} |
void FontConfigTypeface::onGetFamilyName(SkString* familyName) const { |
- *familyName = this->getFamilyName(); |
+ *familyName = fFamilyName; |
} |
void FontConfigTypeface::onGetFontDescriptor(SkFontDescriptor* desc, |
bool* isLocalStream) const { |
- desc->setFamilyName(this->getFamilyName()); |
+ SkString name; |
+ this->getFamilyName(&name); |
+ desc->setFamilyName(name.c_str()); |
desc->setFontIndex(this->getIdentity().fTTCIndex); |
*isLocalStream = SkToBool(this->getLocalStream()); |
} |