STRUCT VC_FONT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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