mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
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:
parent
450b0fe92b
commit
d7db54ea5e
2 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue