font_data_glyph_buf(9)
π font_data_glyph_buf(9) π
okay so bestie, welcome to the font_data_glyph_buf(9) page from the Kernel API Manual β yes that's the manual name, we're not typing the whole header line again, you're welcome β¨
πΈ NAME πΈ
font_data_glyph_buf β hands you the glyph for one specific character as raw bytes, no cap π«Ά
β¨ SYNOPSIS β¨
const unsigned char * font_data_glyph_buf (font_data_t *fd , unsigned int width , unsigned int vpitch , unsigned int c );
like. that's the whole vibe. four args, one pointer back. slay π
π ARGUMENTS π
fdβ the font data itself. the main character of this whole thing πwidthβ the glyph width, measured in bits per scanline. yes, bits. not bytes. don't come for me πvpitchβ the number of scanlines per glyph. that's the vertical situation πcβ the character. the one you're asking about π¦
π DESCRIPTION π
so here's the tea: glyphs start at fixed intervals within the font data. like a little grid, every glyph parked in its own slot π
font_data_glyph_buf returns the glyph shape of the specified character. it's literally just giving you the shape, raw π
and if no such glyph exists in the font? it returns NULL. no glyph, no problem, just NULL π
ngl it's giving "look but don't touch" β you'll see why in a sec.
β RETURN β
you get the character's raw glyph shape back β the actual bytes β or NULL if no glyph exists for that character π
and the buffer they hand you is read-only. read it, admire it, do not write to it. periodt π π₯
π§ SEE ALSO π§
Kernel file ./lib/fonts/fonts.c β plus the whole friend group:
font_data_import(9)font_data_get(9)font_data_put(9)font_data_size(9)font_data_is_equal(9)font_data_export(9)find_font(9)get_default_font(9)
iykyk β go read those next, bestie ππ
and that's the page!! π« courtesy of ./lib/fonts, dated October 2026, signed off by the manual page font_data_glyph_buf(9) β mwah, love u, go get those glyphs ππ
π«Ά
π¦ 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