font_glyph_rotate_90(9)
π« font_glyph_rotate_90 β the Kernel API Manual, bestie edition β¨
Okay so this page is font_glyph_rotate_90(9) and it's literally about spinning a glyph pattern 90Β° clockwise. That's it, that's the whole vibe. Let's get into it π
πΈ NAME πΈ
font_glyph_rotate_90 β rotate a glyph pattern by 90Β° in clockwise direction. Yes, clockwise, we don't do counter-clockwise here, that's a whole other function's job π
β¨ SYNOPSIS β¨
void font_glyph_rotate_90 (const unsigned char *glyph , unsigned int
width , unsigned int height , unsigned char *out );
Four params, no return value, we're just out here mutating your buffer. Slay π«Ά
π¦ ARGUMENTS π¦
glyphβ the glyph you want rotated, the main character of this whole operation πwidthβ the glyph width in bits per scanline, like how wide each line is in bits πheightβ the number of scanlines in the glyph, i.e. how many of those bad boys there areoutβ the rotated glyph bitmap, where the glow-up lands π
π DESCRIPTION π
So the way that this works: width and height describe the input glyph you passed in as glyph. Read that again, because it matters β those numbers are about what goes in, not what comes out.
The caller (that's you, bestie π) has to provide the output buffer out and it has to be of sufficient size to hold the rotated glyph. Nobody's allocating that for you. You're on your own for the memory, fr fr.
And here's the part people forget: rotating by 90Β° flips the width and height for the output glyph. So your outputs swapped dimensions. Periodt.
Also, depending on the glyph pitch, the size of the output glyph can be different than the size of the input. Not a bug, just how it is. Callers have to take this into account when allocating the output memory β so like, actually do the math before you malloc, don't just vibe-check it π
β οΈ Real talk: if you eyeball the buffer size and guess, that's giving undefined chaos. Do the math. Allocate correctly. Protect your stack. π
π§ SEE ALSO π§
- Kernel file
./lib/fonts/font_rotate.cβ the source, go read it iykyk π font_glyph_rotate_180(9)β for when 90Β° isn't enough π₯font_glyph_rotate_270(9)β the other other rotationfont_data_rotate(9)β rotating the data wholesale, the icon β¨
π sign-off π
This lil masterpiece lives in ./lib/fonts, dated October 2026, and it's version font_glyph_rotate_90(9) β go rotate something cute, bestie, and remember to size your buffers πβπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms