Fabric.js text space and strokeWidth

I have 2 problems with Fabric.js iText.

  1. I have a problem with text in Fabric.js. I want to use handwriting font “Alex Brush” in my app. The text is starting a bit out of box. At the end of the text is the same problem – text ends out of the box

  2. If strokeWidth is too high, it becomes ugly, as you can see on picture.

Sample Text Image

Try to load your font (maybe you’re loading it from Google Fonts) before render the text. The strokeWidth is not an issue, if you don’t like the result, try changing the font or make strokeWidth smaller