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

Unified Diff: src/ports/SkFontConfigInterface_android.cpp

Issue 23592002: Fix issue when the family name is reused among multiple families. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 | « no previous file | no next file » | 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 e9886188b247fb6172a8de6f1a1288f1bce1f81c..c9dc944f81d6df75687743a34874c97f42cfd6b7 100644
--- a/src/ports/SkFontConfigInterface_android.cpp
+++ b/src/ports/SkFontConfigInterface_android.cpp
@@ -183,7 +183,12 @@ static void get_path_for_sys_fonts(SkString* full, const char name[]) {
static void insert_into_name_dict(SkTDict<FamilyRecID>& familyNameDict,
const char* name, FamilyRecID familyRecID) {
SkAutoAsciiToLC tolc(name);
- familyNameDict.set(tolc.lc(), familyRecID);
+ if (familyNameDict.find(tolc.lc())) {
reed1 2013/08/27 17:23:39 I think a block-comment here describing the actual
+ SkDebugf("---- system font attempting to use a the same name [%s] for"
+ "multiple families. skipping subsequent occurrences", tolc.lc());
+ } else {
+ familyNameDict.set(tolc.lc(), familyRecID);
+ }
}
// Defined in SkFontHost_FreeType.cpp
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698