Index: src/ports/SkFontMgr_fontconfig.cpp |
diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp |
index 485e0fc6cc235846f581786f4c8d00c49c192ce3..58597d93952bcc07a630c1c9a8a85f1445df13bc 100644 |
--- a/src/ports/SkFontMgr_fontconfig.cpp |
+++ b/src/ports/SkFontMgr_fontconfig.cpp |
@@ -771,7 +771,10 @@ protected: |
FCLocker lock; |
SkAutoFcPattern pattern; |
- FcPatternAddString(pattern, FC_FAMILY, (FcChar8*)familyName); |
+ FcValue familyNameValue; |
+ familyNameValue.type = FcTypeString; |
+ familyNameValue.u.s = reinterpret_cast<const FcChar8*>(familyName); |
+ FcPatternAddWeak(pattern, FC_FAMILY, familyNameValue, FcFalse); |
fcpattern_from_skfontstyle(style, pattern); |
SkAutoFcCharSet charSet; |