Fix issue when the family name is reused among multiple families.
BUG=chromium:274117 R=reed@google.com Review URL: https://codereview.chromium.org/23592002 git-svn-id: http://skia.googlecode.com/svn/trunk@10942 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
1c9518b09d
commit
92e3f08c91
@ -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())) {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user