aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-23 16:35:09 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-23 16:35:09 +0000
commitab792828a57b663841dacffda9c2163e5e45d934 (patch)
treee7b6a0efa7ae15782a475208aad2eacf825c4230
parentb7dbf633a69408fef33105e39b60c442771dba07 (diff)
its ok if there is no family name in the pattern for fontconfig, for fc will interpret
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
-rw-r--r--src/ports/SkFontConfigInterface_direct.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ports/SkFontConfigInterface_direct.cpp b/src/ports/SkFontConfigInterface_direct.cpp
index 3663794bc5..c93cacd507 100644
--- a/src/ports/SkFontConfigInterface_direct.cpp
+++ b/src/ports/SkFontConfigInterface_direct.cpp
@@ -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;