diff options
author | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-19 12:08:40 +0000 |
---|---|---|
committer | djsollen@google.com <djsollen@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-19 12:08:40 +0000 |
commit | 1f584ed3f43037e85bae3019d48e793ae28ebbd5 (patch) | |
tree | aa0ddef34533481122aa6c6c027a1ae649afcae2 /src | |
parent | b39b5b100a6c1cc8ae282618c746f85e14eb6f3b (diff) |
Update Android's FontHost to return NULL if familyName does not match
R=scroggo@google.com, wangxianzhu@chromium.org
Review URL: https://codereview.chromium.org/23601041
git-svn-id: http://skia.googlecode.com/svn/trunk@11377 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/ports/SkFontConfigInterface_android.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ports/SkFontConfigInterface_android.cpp b/src/ports/SkFontConfigInterface_android.cpp index 9a38261e80..f56308dda9 100644 --- a/src/ports/SkFontConfigInterface_android.cpp +++ b/src/ports/SkFontConfigInterface_android.cpp @@ -413,10 +413,11 @@ bool SkFontConfigInterfaceAndroid::matchFamilyName(const char familyName[], } + // If no matching family name is found then return false. This allows clients + // to be able to search for other fonts instead of forcing them to use the + // default font. if (INVALID_FAMILY_REC_ID == familyRecID) { - //TODO this ensures that we always return something - familyRecID = fDefaultFamilyRecID; - //return false; + return false; } FontRecID fontRecID = find_best_style(fFontFamilies[familyRecID], style); |