font_glyph_size(9)
π 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 π§
- Kernel file
./include/linux/font.hπ font_glyph_pitch(9)πfont_data_t(9)βfont_data_buf(9)π
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
- 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