font_data_import(9)
π 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 infont, 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:
font_data_get(9)font_data_put(9)font_data_size(9)font_data_glyph_buf(9)font_data_is_equal(9)font_data_export(9)find_font(9)get_default_font(9)
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
- 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