Index: src/ports/SkFontMgr_fontconfig.cpp |
diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp |
index 00b962afee1b1ad9f1717bd814eac424ad294c1b..6fc1f28c89bc318ce2d26622b5acf94f0da295ef 100644 |
--- a/src/ports/SkFontMgr_fontconfig.cpp |
+++ b/src/ports/SkFontMgr_fontconfig.cpp |
@@ -806,13 +806,9 @@ protected: |
const SkFontStyle& style) const SK_OVERRIDE |
{ |
//TODO: should the SkTypeface_fontconfig know its family? |
- const char* name = NULL; |
- if (typeface) { |
- const SkTypeface_fontconfig* fcTypeface = |
+ const SkTypeface_fontconfig* fcTypeface = |
static_cast<const SkTypeface_fontconfig*>(typeface); |
- name = get_string(fcTypeface->fPattern, FC_FAMILY); |
- } |
- return this->matchFamilyStyle(name, style); |
+ return this->matchFamilyStyle(get_string(fcTypeface->fPattern, FC_FAMILY), style); |
} |
/** @param stream does not take ownership of the reference. */ |