pretext icon indicating copy to clipboard operation
pretext copied to clipboard

Direction aware ligatures

Open mordechaim opened this issue 1 month ago • 1 comments

I work with Hebrew fonts, there are some characters that only ligate when the canvas direction is rtl, otherwise they stay as 2 distinct chars and the width is miscalculated.

With direction: rtl

Image

With direction: ltr

Image

They are copyrighted fonts which I can't share here, if you need them for testing I'll happily send them over to email of your choice.

I had forked this project and patched this flaw by adding direction option to prepare(). (That fork also fixes #107 by using a DOM canvas when available)

https://github.com/codaworks/pretext/commit/554520d45376413639ade60c5221aab1fe07a5f1

mordechaim avatar Oct 14 '26 19:10 mordechaim

I replayed the fix on v1.0.0 https://github.com/codaworks/pretext/commit/a4097d97d50f3f86321bd005acf87d6e08f97e0d

mordechaim avatar Oct 15 '26 03:10 mordechaim