|
|
|
|
|
by laurmaedje
1242 days ago
|
|
I would argue that font rendering and text shaping are completely separate problems. The font renderer doesn't need to know about directions, language, locales and scripts and using one of these simple libraries doesn't mean that an application cannot have a capable text layout and shaping implementation. Although Typst uses pixglyph for rendering, it does support BiDi, complex script shaping, etc. For shaping, we use rustybuzz, which is pretty much a 1-1 port of harfbuzz to Rust. Although we would have gladly used harfbuzz, linking C and Rust in WASM is unfortunately not really possible. So we went for the practical choice of helping finish this port and using it. |
|
> it does support BiDi, complex script shaping
Hey, that is indeed quite good. Would you mind if I ask you how well is the support for popular Asian languages?
> linking C and Rust in WASM is unfortunately not really possible
Damn. I am not very experienced in Rust but I would not have guessed that. I apologize if I misrepresented difficulties related to targeting WASM.
[1] https://github.com/apple-oss-distributions/WebKit/tree/WebKi...
[2] https://github.com/apple-oss-distributions/WebKit/tree/WebKi...
[3] https://github.com/chromium/chromium/tree/main/third_party/f...
[4] https://github.com/chromium/chromium/tree/main/third_party/h...
[5] https://searchfox.org/mozilla-central/source/modules/freetyp...
[6] https://searchfox.org/mozilla-central/source/gfx/harfbuzz
[7] https://cs.android.com/android/platform/superproject/+/maste...
[8] https://cs.android.com/android/platform/superproject/+/maste...
[9] https://www.amazon.com/gp/help/customer/display.html?nodeId=...