HOMEBLOGDEVLOG

Label wrapping

Adam C. Clifton
22 Apr 2026

I've improved the word wrap on labels in CliffyPDA, so now it can render multiline text for cards in the kanboard app.

Labels were previously single line, and generated as a 1bit bitmap. The initial problem with rendering multiple lines is that bitmap gets too big for an ESP32, even at 1bit per pixel. So generating the bitmap for tasks with a lot of text would crash the device.

So the next step was to process the string and break it up into substrings, pre wrapped for each line of the output. This still creates all the bitmap data up front, but there's a lot less empty space so it takes less memory.

This is actually good enough for now, but the next step is that we can create and throw out the bitmap based on if the line of text is on screen or not. And that will make things much more efficient.

Even beyond that we can look at streaming the data in from the server or off disk, and really limiting what we need to keep in memory. But that's pretty extreme so I don't think we'll need to go that far...

Previous: Kanboard PostgreSQL
© Numbat Logic Pty Ltd 2014 - 2026