Chromium Code Reviews| Index: src/ports/SkFontMgr_fontconfig.cpp |
| diff --git a/src/ports/SkFontMgr_fontconfig.cpp b/src/ports/SkFontMgr_fontconfig.cpp |
| index 782fb268ccc7e18b2c320b45f3365c3895bb305a..b8a3fe5b0d232de1c0c21c74c6613c1965445e25 100644 |
| --- a/src/ports/SkFontMgr_fontconfig.cpp |
| +++ b/src/ports/SkFontMgr_fontconfig.cpp |
| @@ -798,9 +798,13 @@ protected: |
| const SkFontStyle& style) const SK_OVERRIDE |
| { |
| //TODO: should the SkTypeface_fontconfig know its family? |
| - const SkTypeface_fontconfig* fcTypeface = |
| - static_cast<const SkTypeface_fontconfig*>(typeface); |
| - return this->matchFamilyStyle(get_string(fcTypeface->fPattern, FC_FAMILY), style); |
| + const char* name = NULL; |
|
mtklein
2014/09/12 18:55:27
not ""?
bungeman-skia
2014/09/12 19:02:32
Yeah, I want no-name not empty-name here. In theor
|
| + if (typeface) { |
| + const SkTypeface_fontconfig* fcTypeface = |
| + static_cast<const SkTypeface_fontconfig*>(typeface); |
| + name = get_string(fcTypeface->fPattern, FC_FAMILY); |
| + } |
| + return this->matchFamilyStyle(name, style); |
| } |
| /** @param stream does not take ownership of the reference. */ |