font_glyph_size(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– font_glyph_size(9) β€” kernel API manual, bestie edition πŸ’–

okay so welcome to font_glyph_size, a little function from the Kernel API Manual that does exactly one job and does it iconically: it tells you how many bytes one glyph takes up. that's it. that's the whole vibe. ✨


🌸 NAME 🌸

font_glyph_size β€” calculates the number of bytes per glyph

no cap, that's literally the entire mission statement πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

unsigned int font_glyph_size (unsigned int width , unsigned int vpitch );

two unsigned int arguments in, one unsigned int out. clean. minimal. main character energy fr fr πŸŽ€


✨ ARGUMENTS ✨

  • width β€” the glyph width, measured in bits per scanline πŸ‘‘
  • vpitch β€” the number of scanlines in the glyph 🌈

that's the tea. two numbers, both unsigned int, both matter. 🫢


πŸ’œ DESCRIPTION πŸ’œ

okay so here's the lore: the number of bytes in a glyph depends on the pitch and the number of scanlines. like, those are the two things doing all the work. πŸ’€

and here's the slay part β€” font_glyph_size automatically calculates the pitch from the width you hand it. you don't gotta do the math yourself, it's giving "I got you bestie" 😭✨

then there's vpitch, which gives the number of scanlines β€” and yeah, that's usually just the glyph's height in scanlines. simple. but not always!! 🚨

fonts coming from user space can sometimes have a different vertical pitch, with empty scanlines chillin' between two adjacent glyphs πŸ™ˆ so don't just assume vpitch equals the height, because user space fonts love to be extra.

πŸ”₯ RETURN πŸ”₯

the number of bytes per glyph πŸ’– (an unsigned int, naturally, because look at the synopsis babe)


🧚 SEE ALSO 🧚

go read those too, they're all part of the same little font family and they ate πŸ’…


and that's the whole page!! officially sourced from ./include/linux, dated October 2026, and yeah the manual name up top is font_glyph_size(9) in case you forgot already 😌 stay hydrated, know your pitch, and go calculate some glyph bytes πŸ’–πŸŽ€πŸ¦‹πŸŒΈβœ¨

πŸ“¦ where this page comes from