STRUCT VC_FONT(9)
π struct vc_font β bestie's guide to font structs π
okay so this is a page from the Kernel API Manual (yes, the kernel has a manual, slay) and it's all about struct vc_font β literally just a little struct that describes a font. that's the whole vibe. iconic, honestly. β¨
πΈ SYNOPSIS πΈ
here's the whole shape of it, bestie, exactly as-is:
struct vc_font {
unsigned int width;
unsigned int height;
unsigned int charcount;
const unsigned char *data;
};
four fields. that's it. no notes. π
π Members π
widthβ the width of a single glyph, measured in bits. one glyph, horizontally, in bits.heightβ the height of a single glyph, measured in scanlines. (scanlines = the horizontal lines the screen draws, iykyk.)charcountβ how many glyphs live in this font. the headcount. the roster. π«Άdataβ the raw font data itself. the actual bytes. no cap.
π¦ Description π¦
so the font data is organized as an array of glyphs β one after another, like a little lineup. each glyph is a bitmap, and here's the cute part: a set bit means foreground color, and an unset bit means background color. so every bit is literally a pixel decision. π₯
the fields width and height store, for a single glyph, how many horizontal bits and how many vertical scanlines it has.
β οΈ watch out bestie: if width is not a multiple of 8, there are trailing bits left over to fill up the byte. those bits should not be drawn. do not draw them. that's the rule. π
the field data points to the first glyph's first byte. so it's like, the very start of the whole glyph party. π
and the value charcount gives you the number of glyphs in the font.
also β and this is important β there are no empty scanlines between two adjacent glyphs. none. zero. they're packed right up against each other. periodt. π
π SEE ALSO π
- Kernel file
./include/linux/console_struct.h struct vc_state(9)
okay that's the whole page, bestie, you ate that π stay curious, keep reading structs, and remember: unset bits are background, not a personality. π
β signed off from ./include/linux, dated October 2026 β the struct vc_font(9) era, genuinely a moment πβπ§
π¦ 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