Tgemayel / variable-fonts-figma

A plugin to run variable fonts in Figma
Apache License 2.0
40 stars 4 forks source link

Support Arabic, Indic, South East Asian, etc scripts #7

Open davelab6 opened 3 years ago

davelab6 commented 3 years ago

While Arabic text input results in shaped input (because its using the electron webkit to render the text), when clicking Add then the result is not shaped, because the samsa engine doesn't apply the shaping needed, so the Vector graphic on the canvas doesn't match:

Screen Shot 2021-04-01 at 10 41 51

I expect we'll need @lorp to add a harfbuzz.wasm module to samsa to address this in a simple and holistic way for samsa users like this plugin

davelab6 commented 3 years ago

I changed macOS keyboard to "arabic" and then entered u then space then uuu:

ع ععع

And see this:

Screen Shot 2021-04-07 at 16 26 27

So it appears to now be working in 0.2.1

davelab6 commented 3 years ago

Hmm, RTL doesn't work well, the presence of arabic characters causes all characters to be ordered this way, and the   is shown in reverse order at the start

Screen Shot 2021-04-09 at 14 40 12
khaledhosny commented 3 years ago

It seems to be missing both script and bidi itemization and depending on HarfBuzz guessed segment properties which is very simplistic and meant for quick testing only.