Skip canvas being used during Control.serialize()?

Hi @Deltakosh !

Sorry been a long time since I updated this. I found the issue but can’t recreate it on the playground because it always has a canvas even if give allowCanvas=false during serialization. Same goes for my dev env.

I don’t mind making a PR but I can’t get this error to fire with normal testing because there is always a canvas.
This error occurs when I run my Figma to Babylonjs plugin.

This is happening in the _prepareFont() function here (during serialization)

But it should be skipped with allowCanvas=false

I think it maybe due to Button ioverriding the serialize function but not passing/acknowledge the allowCanvas param.

This isn’t an issue on normal TextBlocks, only happens on Buttons but I assume could happen in Grids too since they also have an override during serialization.

Do you think I’m on the right track?