-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement shaping using Rustybuzz 0.3.0 #40
Conversation
These are screenshots from the KAS layout example, respetively with no shaping, HarfBuzz shaping, and Rustybuzz shaping: Arabic text is from this sample. It appears that Rustybuzz is not doing any shaping here. @RazrFalcon you claim rustybuzz has 98% compliance with the Harfbuzz test suite, hence I assume Arabic shaping is included? Any idea why it isn't being used here? The Rustybuzz driver code is close to a copy+paste of the Harfbuzz code, and is being used. No "features" are enabled for either HarfBuzz or Rustybuzz; I think they aren't needed? Harfbuzz enables several by default. |
Rustybuzz passes Harfbuzz's test suite which has like 1500 tests, so I'm pretty sure It's identical. I need a minimal reproduceable example. Can you run your text + font through |
This is just the first word. And yes, it appears that $ cargo run --example shape /usr/share/fonts/blender/droidsans.ttf عندما
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
Running `/home/dhardy/.cache/cargo/debug/examples/shape /usr/share/fonts/blender/droidsans.ttf 'عندما'`
uniFE8D=4+530|uniFEE1=3+1360|uniFEA9=2+1001|uniFEE5=1+1376|uniFEC9=0+1106
$ hb-shape /usr/share/fonts/blender/droidsans.ttf عندما
[uniFE8E=4+616|uniFEE3=3+1237|uniFEAA=2+1124|uniFEE8=1+698|uniFECB=0+1079] Edit: longer samples
|
Can you also include this exact font? I will take a look. |
Sorry, you might need to rename that to |
I've finally found time to investigate this and looks like you've hit the unsupported 2%. Sadly, I'm not sure why harfbuzz does this, but I presume this is because the particular font doesn't have Arabic shaping data. So you should simply use an another one. HarfBuzz has a single test case for this feature, so I'm not sure how common it is. In general, rustybuzz does support Arabic shaping, as long as you are using the correct font. Like Amiri. |
Interesting answer. Thanks for investigating. |
Proof of concept. Seems to work identically to the "simple shaper" on my Arabic sample — Rustybuzz doesn't support that language yet?