Rich text - the justification calculation
If you are laying out text then you will need to justify it. But what's the algorithm? Lets take a look...
A tech blog giving usable explainers, advice, tools, tricks and techniques for the Konva JavaScript canvas library, the HTML5 canvas, and related subjects.
If you are laying out text then you will need to justify it. But what's the algorithm? Lets take a look...
I'm developing an app that will generate / layout rich text in a canvas. So far my focus has been on the browser but now I need to do some automated testing for which I use node. But node doesn't provide text support out-of-the-box so we have to use node-canvas. How to work with text in node-canvas?
So I spent some time building a rich text editor as a side project. Here's some of what I learned which I'm sharing so you can avoid the bear traps and subsequent pain!
Working with non-English languages or emoji's and finding that strings get garbled or just don't add up? Let me try to explain why...