T
T
thehighhomie2019-11-07 18:21:57
JavaScript
thehighhomie, 2019-11-07 18:21:57

Canvas crookedly displays Cyrillic fonts after loading via webfontloader?

Why, after loading fonts through, and adding text to the canvas, Cyrillic is displayed crookedly, and Latin is excellent.
For canvas, I use the fabricjs framework.
Please take a look at the sandbox there is very little code and left a couple of comments.
When entering text in English, the text is displayed well, but if you enter in Russian, then the font is not loaded into the canvas at first, in order for the font to load, you need to re-render the object on the canvas, for example, move or resize the object, after which the Cyrillic font will be displayed, but it will get out of the object.
After you add text in Russian to the canvas for the first time, the font will be cached in the canvas and will be displayed normally on the next reboot, so clear the cache before checking the sandbox.
Please help me understand why this is happening and how to fix this bug. I myself suffered for a very long time, but did not understand.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question