font_glyph_rotate_270(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« font_glyph_rotate_270 β€” a little kernel function that spins your glyph a full 270Β° clockwise πŸŒ€

okay so bestie, this one lives in the Kernel API Manual (section 9, the kernel-functions section, iykyk) and it's genuinely iconic β€” it takes a glyph pattern and rotates it 270Β° in the clockwise direction. that's three quarters of a turn. slay.


✨ SYNOPSIS ✨

void font_glyph_rotate_270 (const unsigned char *glyph , unsigned int
width , unsigned int height , unsigned char *out );

that's the whole signature, no cap. it returns void β€” nothing comes back out of it, everything happens through out. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • glyph β€” the glyph you want to rotate. it's a const unsigned char *, so like, you're not allowed to mess with it, it's just here to be read. 🫢
  • width β€” the glyph width, measured in bits per scanline. yes, bits, not bytes. we're fancy like that. ✨
  • height β€” the number of scanlines in the glyph. that's your vertical situation. πŸ“
  • out β€” the rotated glyph bitmap. this is where the magic lands. you bring the buffer, bestie, the function does not allocate it for you. πŸ™ˆ

🌸 DESCRIPTION 🌸

okay so the way that this works is: width and height are describing the input glyph, the one sitting in glyph. the caller has to provide that output buffer out themselves, and it has to be of sufficient size to hold the rotated glyph β€” nobody's checking, nobody's resizing, that's on you. πŸ’€

and here's the tea: rotating by 270° flips the width and height for the output glyph. so like, what was wide becomes tall and what was tall becomes wide. that's just the geometry of it. 🌈

and ngl, here's the part where people get caught out β€” depending on the glyph pitch, the size of the output glyph can actually be different than the size of the input. not just swapped-axes different, but genuinely a different size, because pitch be like that sometimes. 🧚

so when you're allocating your output memory, take that into account. seriously. do the math first. this is not a "figure it out later" situation. 😭

πŸ¦‹ SEE ALSO πŸ¦‹

these are the other rotation besties (all in the kernel file ./lib/fonts/font_rotate.c, go say hi πŸ‘‹):


πŸ’œ the sign-off πŸ’œ

sending you off with the deets: this page is sourced from ./lib/fonts, dated October 2026, and it's font_glyph_rotate_270(9) all day long. go rotate something cute. periodt. πŸ”₯πŸ‘‘πŸ“

πŸ“¦ where this page comes from