Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(678)

Unified Diff: src/ports/SkFontConfigInterface_android.cpp

Issue 23601041: Update Android's FontHost to return NULL if familyName does not match (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: addressing comments Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/tests.gyp ('k') | tests/Typeface.cpp » ('j') | tests/Typeface.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontConfigInterface_android.cpp
diff --git a/src/ports/SkFontConfigInterface_android.cpp b/src/ports/SkFontConfigInterface_android.cpp
index 9a38261e80262789788e545dd9d86cbb5d1d9825..f56308dda94fab7624599ee5f767e5ac710158fd 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);
« no previous file with comments | « gyp/tests.gyp ('k') | tests/Typeface.cpp » ('j') | tests/Typeface.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698