Upstream Clank's SkFontHost_Android DRT infinite loop fix.
We may have to do future work to reconcile this with Android native; probably pending Android OS adding a font manager API. http://codereview.appspot.com/6497081/ git-svn-id: http://skia.googlecode.com/svn/trunk@5386 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
26a4d352e5
commit
b9e4c5d82b
@ -922,6 +922,9 @@ SkTypeface* SkFontHost::CreateTypefaceFromStream(SkStream* stream) {
|
|||||||
|
|
||||||
if (find_name_and_attributes(stream, NULL, &style, &isFixedWidth)) {
|
if (find_name_and_attributes(stream, NULL, &style, &isFixedWidth)) {
|
||||||
SkAutoMutexAcquire ac(gFamilyHeadAndNameListMutex);
|
SkAutoMutexAcquire ac(gFamilyHeadAndNameListMutex);
|
||||||
|
// Make sure system fonts are loaded to comply with the assumption of
|
||||||
|
// unique id offset by one in find_uniqueID.
|
||||||
|
load_system_fonts();
|
||||||
return SkNEW_ARGS(StreamTypeface, (style, false, NULL, stream, isFixedWidth));
|
return SkNEW_ARGS(StreamTypeface, (style, false, NULL, stream, isFixedWidth));
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user