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

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: 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') | no next file with comments »
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..c698d0c3c6cb5d5c30267830a9c8ff8fe9f89fe7 100644
--- a/src/ports/SkFontConfigInterface_android.cpp
+++ b/src/ports/SkFontConfigInterface_android.cpp
@@ -414,9 +414,7 @@ bool SkFontConfigInterfaceAndroid::matchFamilyName(const char familyName[],
}
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);
@@ -495,6 +493,7 @@ SkTypeface* SkFontConfigInterfaceAndroid::getTypefaceForFontRec(FontRecID fontRe
SkAssertResult(fFamilyNameDict.findKey(fontRec.fFamilyRecID, &familyName));
SkASSERT(familyName);
face = SkTypeface::CreateFromName(familyName, fontRec.fStyle);
+ SkASSERT(face);
reed1 2013/09/18 19:51:37 Why are we asserting here?
djsollen 2013/09/18 19:57:30 This function takes fontRecID's which correspond t
}
// store the result for subsequent lookups
« no previous file with comments | « gyp/tests.gyp ('k') | tests/Typeface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698