font_data_t(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

typedef font_data_t β€” raw font data, bestie πŸ’– (and yeah, this is a page straight out of the Kernel API Manual, we're doing kernel-level stuff today, slay)

πŸŽ€ Description πŸŽ€

Okay so listen. Values of type font_data_t store a pointer to raw font data. The format is monochrome β€” black and white, no grey areas, very "pick a side" energy πŸ’… Each bit sets a pixel of a stored glyph.

And here's the tea: font data does not store geometry information for the individual glyphs 😭 So if you're using the font, you have to store glyph size, pitch and character count separately. Yes, separately. It's giving "I brought the snacks but not the plates", you gotta bring the plates yourself 🫢

Also, font data in font_data_t is not equivalent to raw u8. Iconic of it to be clear. Each pointer stores an additional hidden header before the font data, so it's not just bytes in a trench coat, there's lore.

The layout is:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ -16   CRC32 Checksum (optional) β”‚
β”‚ -12   <Unused>                  β”‚
β”‚ -8    Number of data bytes      β”‚
β”‚ -4    Reference count           β”‚
β”‚ 0     Data buffer               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Use the helpers to access font_data_t, please and thank you πŸ™ˆ Use font_data_buf to get the stored data.


🌈 SEE ALSO 🌈


That's the whole vibe check, bestie β€” the page lives at ./include/linux and it's dated October 2026, so like... future king behaviour πŸ‘‘βœ¨ Go forth and read your font headers responsibly πŸ’œ

πŸ“¦ where this page comes from