font_data_t(9)
β¨ 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 infont_data_tis not equivalent to rawu8. 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 π
- Kernel file
./include/linux/font.h font_glyph_pitch(9)font_glyph_size(9)font_data_buf(9)
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
- 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