This seems to be built out of pure love for technology but I am wondering how much time and effort has gone into that.
This seems to be built out of pure love for technology but I am wondering how much time and effort has gone into that.
For me, it was the best part of 4 months of mornings, evenings and weekends - and roughly 40% of my sanity (quaternions took the other 60% a few years ago). And the work is nowhere near finished. Knowing that I still need to find a proper fix for CJK punctuation brings me out in hives. I've also developed a special hatred of Thai fonts.
As for styling a single Arabic glyph within a word ... has anyone in the world managed to do that? It's when I failed to achieve that idea I decided to throw in the towel and release the work as Good Enough because I've Had Enough!
Still - it was an adventure[1].
Tbh all the complex part is handled by: https://github.com/harfbuzz/harfbuzzjs which handles the entire text shaping part (which glyphs to draw and the offset from previous glyph), then all that remains is text layout (linebreaking, kerning, line height, font size etc.) and the actual rendering ofc. Still took about 4 months of full-time work.
People who develop canvas libraries soon learn that they don't get to play with Nice Things like consistency across browser implementations for the standards they've (allegedly) agreed to respect.
[1] - https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics
I've never heard about this. Where can I read more about it?
> ascend upwards depending upon the length of the word
Did I just miss it?
Complexity comes from the fact that in Arabic, a single character can have at max 4 contextual shapes generally speaking. In Nastaleeq variation, a single character can have up 100s of contextual shapes depending upon where it appears in the word.
And maybe it sounds silly, but we don't personally feel pure love for technology. We're obsessed with a vision. And we've decided to conquer any technical challenge to make it real.