Commit 7ac8da6d authored by Raph Levien's avatar Raph Levien Committed by Android Git Automerger
Browse files

am 7c6d54cd: Fix bug 6479740: Serif font gone in tot/jb-dev

* commit '7c6d54cd':
  Fix bug 6479740: Serif font gone in tot/jb-dev
parents f3f753c8 7c6d54cd
......@@ -221,12 +221,10 @@ static void detachAndDeleteFamilyLocked(FamilyRec* family) {
static SkTypeface* findTypefaceLocked(const char name[], SkTypeface::Style style) {
int count = gNameList.count();
if (count) {
NameFamilyPair* list = gNameList.begin();
int index = SkStrLCSearch(&list[0].fName, count, name, sizeof(list[0]));
if (index >= 0) {
return findBestFaceLocked(list[index].fFamily, style);
}
NameFamilyPair* list = gNameList.begin();
int index = SkStrLCSearch(&list[0].fName, count, name, sizeof(list[0]));
if (index >= 0) {
return findBestFaceLocked(list[index].fFamily, style);
}
return NULL;
}
......@@ -242,13 +240,11 @@ static void addNameLocked(const char name[], FamilyRec* family) {
name = tolc.lc();
int count = gNameList.count();
if (count) {
NameFamilyPair* list = gNameList.begin();
int index = SkStrLCSearch(&list[0].fName, count, name, sizeof(list[0]));
if (index < 0) {
list = gNameList.insert(~index);
list->construct(name, family);
}
NameFamilyPair* list = gNameList.begin();
int index = SkStrLCSearch(&list[0].fName, count, name, sizeof(list[0]));
if (index < 0) {
list = gNameList.insert(~index);
list->construct(name, family);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment