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 committed by Hermet Park
parent 1e692f223c
commit bace6b9e52
2 changed files with 3 additions and 3 deletions

View file

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

View file

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