Email or username:

Password:

Forgot your password?
3 posts total
Marieke

maybe it's the holidays but I'm feeling very sentimental about window managers today

Marieke

over winter breaks I've always experimented with new ways of 'doing computers', and over the years

installing linux on old computers and setting them up with weird and interesting window managers and other programs. messing around like that has given me a lot of joy and a lot of thoughts about how I want to interact with computers

Marieke

just wrote a very messy text wrapping function. (keep going, don't look back edition)

Marieke

there's a fun little struct called `WrappedText(String)` that I created for this. the only way to construct it is by giving the unwrapped &str and the desired width, along with the font to consider for calculating widths.
from that, it will wrap the text, placing the final String into the struct's field.
that means that the wrapping occurs once, on construction, and that types that require pre-wrapped text to work (efficiently) can rely on it being wrapped.

Devil Lu Linvega

@ma3ke looking great :) those are pretty fun to write

Go Up