[Skottie] Fallback to portable font manager
The -Lottie bot runs with --nonativeFonts so, for some animations that request a specific font (e.g. Helvetica), this would fail, but not fallback to an actual font manager. This makes sure we at least have some text, even if it's the "wrong" font. Bug: skia:8298 Change-Id: Ibce7fda5b0a82fc3a708ab1cf5a7a394484ca89e Reviewed-on: https://skia-review.googlesource.com/150468 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
parent
c9367d33dc
commit
ef0fee0496
@ -123,7 +123,7 @@ void AnimationBuilder::parseFonts(const skjson::ObjectValue* jfonts,
|
||||
LOG("!! Could not create typeface for %s|%s\n",
|
||||
jfamily->begin(), jstyle->begin());
|
||||
// Last resort.
|
||||
tf.reset(fFontMgr->matchFamilyStyle("Arial", SkFontStyle::Normal()));
|
||||
tf = fFontMgr->legacyMakeTypeface(nullptr, FontStyle(jstyle->begin()));
|
||||
if (!tf) {
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user