Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think there's potential in those ideas, if only they are not to the detriment of the Web (which is already working just fine).

As an alternative to iOS and Android development, I welcome ground-up solutions as long as they can get text editing right. However, I bring that up as I can't see anyone ever making a ground-up text view as reliable as a browser or native one (consider CJK, RTL, and vertical text, and IME input) without a dedicated team spending years of work and closely examining each platform's equivalent.



The Rust ecosystem (with cosmic text and parley) is well on the way to achieving this


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!


What 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/ 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?


My 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: