lottie: removed undesired embedded option.

Use local font by default and fall back if no glyphs exist.

Co-Authored-By: Mira Grudzinska <mira@lottiefiles.com>
This commit is contained in:
Hermet Park 2025-05-15 19:02:46 +09:00
parent 450b0fe92b
commit d7db54ea5e
2 changed files with 3 additions and 3 deletions

View file

@ -1015,7 +1015,7 @@ void LottieBuilder::updateText(LottieLayer* layer, float frameNo)
if (!p || !text->font) return; if (!p || !text->font) return;
if (text->font->origin == LottieFont::Origin::FontURL) { if (text->font->origin != LottieFont::Origin::Local || text->font->chars.empty()) {
_fontURLText(text, layer->scene, frameNo, exps); _fontURLText(text, layer->scene, frameNo, exps);
return; return;
} }

View file

@ -325,7 +325,7 @@ struct LottieTextRange
struct LottieFont struct LottieFont
{ {
enum Origin : uint8_t { Local = 0, CssURL, ScriptURL, FontURL, Embedded }; enum Origin : uint8_t {Local = 0, CssURL, ScriptURL, FontURL};
~LottieFont() ~LottieFont()
{ {
@ -347,7 +347,7 @@ struct LottieFont
char* style = nullptr; char* style = nullptr;
size_t dataSize = 0; size_t dataSize = 0;
float ascent = 0.0f; float ascent = 0.0f;
Origin origin = Embedded; Origin origin = Local;
void prepare(); void prepare();
}; };