4 ms·
Rust does well on the text-shaping and glyph rendering, but the rest of the ecosystem is still massively geared towards Windows and game development. I am root
by yw3410 4y ago
Rust does well on the text-shaping and glyph rendering, but the rest of the ecosystem is still massively geared towards Windows and game development.
I am rooting for Vello to succeed!
- overthrow 4y agoWhat would you say is state of the art for Rust-native text rendering on the web? I'm aware of ab_glyph, used by e.g. https://www.egui.rs/ https://www.egui.rs/ but it looks noticeably non-native to my eyes. For one there seems to be no hinting. So text ends up blurry at 96dpi, and since a glyph stroke is thinner than a pixel the text always appears slightly faded, never able to reach fully black or white. I wish these libraries would just use native APIs on each platform to render text, then all these problems would already be solved by the OS/browser. Though I'm not sure if the web has good APIs for that. Maybe there's something better in Rust these days that I missed?
- yw3410 3y agoMy personal applications tend to use only monospaces fonts and stick to Latin characters so I can get away with glyph rendering and then a very simple layout algorithm so something like ab_glyph or freetype is enough and I don't need harfbuzz. I'm aware of swash and the other libraries in that stack, but it was going through a rewrite. The Linux support was incomplete, for example, it was dependent on a piped call to fc-list and parsing the output to get the system fonts. Also, if I were doing it via web, I'd be tempted to render to an offscreen canvas and call it a day.