3 ms·
Good GUIs are deceptively easy. Lines of text: font rendering is pretty difficult to begin with. But it gets harder when you want to match native platform look,
by YmiYugy 2y ago
Good GUIs are deceptively easy.
Lines of text: font rendering is pretty difficult to begin with. But it gets harder when you want to match native platform look, handle different display sub pixel layouts or are dealing with a script that doesn’t fit into a font atlas. On top of that you get text layout which requires careful trade offs between performance and quality as well as a huge number of edge cases you need to handle.
A couple lines of text is easy if it’s fixed layout, monospaced, ascii, but unless you are making dev tools that’s the exception not the norm.
Images: there is a lot of complexity hidden in your image decoder, but even if you disregard that, you have to deal with proper caching and resizing to get good performance to manage vram constraints, handle different screen densities and smooth zooming. On top of that you might need to open the can of worms needed for hdr.
Buttons: if you need buttons you probably also need a text input. Implementing text input in a way consistent with platform expectations, properly supporting IME and accessibility.
There are a bunch of these more lightweight UI frameworks and they are great if you are building a terminal or a text editor. But for desktop or mobile software used by regular people you really need those millions of lines of code.