font_data_import(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– font_data_import(9) β€” Kernel API Manual πŸ’–

okay bestie, welcome to the group chat for font_data_import(9) β€” it's a kernel API manual page and honestly? it's giving "glow-up for your fonts" energy. no cap. 🌸


✨ NAME ✨

font_data_import β€” allocates and initializes font data from user space πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

font_data_t * font_data_import (const struct console_font *font ,
unsigned int vpitch , u32 (*calc_csum)(u32, const void *, size_t) );

πŸ’… ARGUMENTS πŸ’…

  • font β€” a font from user space. yes, the actual font. user space is handing it over, be nice to it 🫢
  • vpitch β€” the size of a single glyph in font, in bytes. one glyph = this many bytes, periodt.
  • calc_csum β€” an optional helper to calculate a chechsum 😭 (that's "checksum" β€” the original page really said chechsum and we're keeping the typo, it's iconic, it's lore, iykyk). optional optional optional, say it with me.

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the whole vibe πŸ‘‘

font data coming in from user space does not speak the kernel's language yet, so it must be translated to the kernel's format. main character requirement, not a suggestion. ✨

the font's glyph geometry and data are provided in font. and the vpitch parameter gives the number of bytes per glyph, including trailing bytes β€” trailing bytes are still invited to the party, they count, don't skip them πŸ’€

the calc_csum parameter is optional. Fbcon passes crc32 to calculate the font data's checksum. that's the whole teΠ°, that's the whole story πŸ“


🌈 RETURN 🌈

newly initialized font data on success πŸŽ‰ or, if things go sideways, a pointer-encoded errno value. yep β€” the error is inside the pointer, sneaky little thing, so go decode it πŸ™ˆ


🧚 SEE ALSO 🧚

kernel file ./lib/fonts/fonts.c, and literally the whole friend group:


aaaaand that's the page, bestie πŸ’œ this one came from ./lib/fonts, dated October 2026 β€” screenshot it, cite it, slay it πŸ‘‘πŸ’–βœ¨

πŸ“¦ where this page comes from