dotlottie-web icon indicating copy to clipboard operation
dotlottie-web copied to clipboard

Unable to load custom font

Open Howlcn1997 opened this issue 10 months ago • 4 comments

Overview

When using bodymovin to export json, turn off the glyphs setting and turn on the bundle fonts and inline fonts settings. After rendering, set fPath to the base64 font file (ttf). It can be rendered successfully in lottie-web's svg mode, but it cannot be displayed normally in lottie-web's canvas mode and dotlottie-web.

demo

https://codesandbox.io/p/sandbox/fast-cherry-y26qd9

What repo were you working in when this issue occurred?

dotlottie-web 0.12.0

Labels

  • [ ] Add the Type: Bug label to this issue.

Howlcn1997 avatar Feb 05 '25 11:02 Howlcn1997

I have the same issue even when I use a system font family like monospace. Text layers just don't render after migration to dotlottie-web. They are still visible here: https://lottiefiles.github.io/lottie-docs/playground/json_editor/ (not sure what player exactly used lottie-web I assume)

UPD: Yes, I did check in lottiefies "player variants" comparator, ThorVG just doesn't render text there :(

Lighttree avatar Feb 06 '25 12:02 Lighttree

Thanks, @Lighttree and @Howlcn1997, for reporting this! We’re looking into it and will get back with a solution soon.

theashraf avatar Feb 07 '25 09:02 theashraf

@Howlcn1997 hello, when we checked, that it seems the embedded font only has these glyphs:

Image

And result like: (since thorvg 1.0.0-pre14)

Image

That is somehow thorvg can do support now.

However, if you really like to show these additional glyphs,

Image

I'd suggest to include them as well in the embedded font data.

Thanks.

hermet avatar Feb 19 '25 05:02 hermet

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs.

github-actions[bot] avatar Apr 21 '25 02:04 github-actions[bot]

@Lighttree @Howlcn1997 custom ttf landed in this release @lottiefiles/[email protected]

theashraf avatar Jun 15 '25 15:06 theashraf