its ok if there is no family name in the pattern for fontconfig, for fc will interpret
authorreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 23 Apr 2013 16:35:09 +0000 (16:35 +0000)
committerreed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 23 Apr 2013 16:35:09 +0000 (16:35 +0000)
an empty string as looking for the default (which is our intent).

git-svn-id: http://skia.googlecode.com/svn/trunk@8830 2bbb7eff-a529-9590-31e7-b0007b416f81

src/ports/SkFontConfigInterface_direct.cpp

index 3663794..c93cacd 100644 (file)
@@ -488,7 +488,8 @@ bool SkFontConfigInterfaceDirect::matchFamilyName(const char familyName[],
 
     const char* post_config_family = get_name(pattern, FC_FAMILY);
     if (!post_config_family) {
-        return false;
+        // we can just continue with an empty name, e.g. default font
+        post_config_family = "";
     }
 
     FcResult result;