Hacker News new | ask | show | jobs
by sjmulder 3156 days ago
Good suggestion! I found st a joy to read. Only a couple of C files, few frills and a straightforward coding style. I can see what the suckless folks are getting at.

Slightly OT here but I was thinking about what a suckless UI system would be like - one without excessive layering and as few moving parts as possible. I'm fairly sure it should be possible by avoiding truetype fonts and using the framebuffer directly. That would preclude ubiquitous animation but smooth scrolling and dragging is perfectly doable even with a single buffer.

4 comments

They already have one:

https://dwm.suckless.org/

That's a window manager. I was thinking more along the lines of a lightweight X replacement.
The problem with running a nonstandard display server is you either need to support Xorg (or Wayland) else face near zero application support.
pure framebuffer UI's exist in embedded systems, they look horrible but constraints are constraints.
> suckless UI system

What about IMGUI? https://github.com/ocornut/imgui

C++ would be a non-starter for them.
What would be the win in avoiding TrueType? Seems like we could easily convert any TTF files to PostScript Type 1 if there were an advantage to be gained.
This might be a misconception but I was under the impression that truetype fonts are a complexity and security minefield. In particular I noticed an st developer complaining (on the mailing list, probably) about the lack of a suckless font library when I concluded that it might be better to just do without them.
Sounds like a noble endeavor. From https://suckless.org/project_ideas

Suckless font rendering library

There is libdrw in suckless now, which still uses xft and fontconfig. Fontconfig and xft are ugly and require too much internal knowledge to be useful. The next logical layer in Linux evolved as pango and cairo. Both of course added HTML formatting and vector drawing. This is not needed to simply draw some text somewhere. And this is what a suckless font rendering library should do: Give it a font string and render at some position the given font without having to care about font specifics.

not 100% but pretty sure the suckless folks are in the static bitmapped font camp - TTF and PS are raster formats.
aren't "bitmapped" and "raster" pretty much synonymous?
They are. cat199 no doubt meant to say that TrueType and PostScript generally use vector (outline) fonts, not raster (bitmap).

They are both capable of providing bitmap fonts as well, but those are less commonly used.

"That would preclude ubiquitous animation"

That would be its best feature.