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

I've been looking forward to this ever since they announced it. Previously they used Skia and their entire app is (and rendering output was) built with Flutter. Now Flutter has a new rendering engine via Impeller which is more optimized than Skia for Flutter specific challenges.

When I asked the Impeller team before what they thought of the Rive renderer, they said that it is great for vector graphics but Impeller needs to also deal with all of the UI related rendering challenges like displaying text properly, so they're not a one to one comparison. Hopefully with this renderer being open source now, both teams can learn from each other.



Correct me if I’m wrong, but aren’t fonts rendered from vector graphics already? TTF and OTF are vector formats, correct?


Fonts begin as vector graphics, but every single character on your screen isn't rendered as a tiny, individual vector graphic. Text rendering libraries use a lot of optimizations to cache rasterized glyphs because they're reused all over your screen.

It also gets extraordinarily complex when you have to handle text layout, kerning, languages that read in different directions, styles, and all of the other complications that come with font rendering.

TrueType fonts even support a small virtual machine to process tiny code programs related to font rendering. It's an incredibly deep topic.


This, but see also Text Rendering Hates You https://faultlore.com/blah/text-hates-you/


> small virtual machine to process tiny code programs

Or even WebAssembly (though more of an experiment than anything): https://github.com/harfbuzz/harfbuzz/blob/main/docs/wasm-sha...


Thank you for your insight!


These glyphs are indeed defined in terms of vector paths (quadratic or cubic Bezier splines depending on the font format), but it’s rarely a good idea to directly render these shapes to display text.

Performance optimizations mentioned in the other comments is not the sole reason. Another one is visual quality.

Direct rendering of these vector glyphs would look good on high DPI displays and/or for very large font sizes. For normal-looking text on typical displays you won’t achieve great results without hinting: https://en.wikipedia.org/wiki/Font_hinting

Another quality related problem is subpixel rendering https://en.wikipedia.org/wiki/Subpixel_rendering Just like hinting, hard to solve while directly rendering vector shapes.




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

Search: