You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a very simple test project that I'm using to explore the boundaries of bodymovin. Great work on the library. My preferred renderer, as far as I can tell, will be the CanvasRenderer. However, I'm unable to get the project to load in the player without checking the "Glyphs" option (as far as I understand, this is exporting every letter used as a shape).
I'm also noticing a commented out line in CVTextElement:
///ctx.fillText(this.textSpans[i].val,0,0);
Maybe this is a hint that this functionality is not yet implemented.
For reference, the error thrown is (from the beginning of getCharData in FontManager):
TypeError: null is not an object (evaluating 'this.chars.length')
The SVGRenderer handles this properly by catching the case of this.globalData.fontManager.chars being undefined.
So, a couple of questions:
Is this a known issue?
Any hints on implementing a PR myself?
Would a workaround be exporting every character as a shape? If so, how would I do that? (Hidden text element with all characters? Kind of gross, but I imagine it would probably work.)
Does exporting fonts as shapes cause any problems with dynamic text? I don't think it would, other than the character not existing.
The text was updated successfully, but these errors were encountered:
Hi, you've done all the research yourself :)
Indeed, I discarded supporting real text on the canvas renderer because it has a really bad performance compared to drawing a shape and it doesn't help for accessibility either.
If you need to support a whole character set, I'd recommend that you export a hidden text layer with all of the glyphs as you said.
Eventually you can create a small script or module to inject all the chars to another animation in order to not have that hidden layer.
Regarding dynamic text, exporting font as shapes should work fine. You won't have special ligatures and that sort of text features, but it will work fine for normal cases.
I have a very simple test project that I'm using to explore the boundaries of bodymovin. Great work on the library. My preferred renderer, as far as I can tell, will be the CanvasRenderer. However, I'm unable to get the project to load in the player without checking the "Glyphs" option (as far as I understand, this is exporting every letter used as a shape).
I'm also noticing a commented out line in
CVTextElement
:Maybe this is a hint that this functionality is not yet implemented.
For reference, the error thrown is (from the beginning of
getCharData
inFontManager
):The SVGRenderer handles this properly by catching the case of
this.globalData.fontManager.chars
being undefined.So, a couple of questions:
The text was updated successfully, but these errors were encountered: