diff options
author | tschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-01 22:49:26 +0000 |
---|---|---|
committer | tschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-01 22:49:26 +0000 |
commit | 7f4f86a43e2da780bedf24f2c6ba5210cfab86e7 (patch) | |
tree | e2cbca66255ad4f7a0edc21cf2053cfba074bba6 /skia | |
parent | a2aeb37507df88ca979e0148ff90c06a601b9ece (diff) | |
download | chromium_src-7f4f86a43e2da780bedf24f2c6ba5210cfab86e7.zip chromium_src-7f4f86a43e2da780bedf24f2c6ba5210cfab86e7.tar.gz chromium_src-7f4f86a43e2da780bedf24f2c6ba5210cfab86e7.tar.bz2 |
Linux/fontconfig: support retrieving a default font via CreateTypeface(NULL, NULL, ...). This is needed in order for SkTypeface::UniqueID(NULL) to not crash.
(By removing the else branch, Match() is called with resolved_family_name as the empty string, which it supports.)
TEST=built and tested O3D on Linux x64 and tried to render "Arial" on a system that didn't have it; verified resulting call to UniqueID(NULL) did not crash and the app successfully rendered text with some sort of default font
BUG=none
Review URL: http://codereview.chromium.org/551210
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37758 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r-- | skia/ext/SkFontHost_fontconfig.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/skia/ext/SkFontHost_fontconfig.cpp b/skia/ext/SkFontHost_fontconfig.cpp index 44ad79f..470aa7c 100644 --- a/skia/ext/SkFontHost_fontconfig.cpp +++ b/skia/ext/SkFontHost_fontconfig.cpp @@ -132,8 +132,6 @@ SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace, } } else if (familyName) { resolved_family_name = familyName; - } else { - return NULL; } bool bold = style & SkTypeface::kBold; |