fcft_precompose(3)

πŸ’… fcft_precompose(3) πŸ’…

okay so bestie, welcome to the fcft_precompose page β€” this is part of the fcft manual, and it's literally the glow-up machine for characters πŸ¦‹βœ¨


✨ NAME ✨

fcft_precompose β€” pre-compose two wide characters into one, no cap 🫢


🌸 SYNOPSIS 🌸

#include <fcft/fcft.h>

bool fcft_precompose(
    const struct fcft_font *font, uint32_t base, uint32_t comb, bool
    *base_is_from_primary, bool *comb_is_from_primary, bool
    *composed_is_from_primary);

like, yes, that's a lot of bool pointers. it's giving "trust the process" πŸ’€


πŸŽ€ DESCRIPTION πŸŽ€

fcft_precompose() takes the wide character base and the wide character comb and composes them into a single wide character. it's the matchmaker of the codepoint world, fr fr πŸ’–

for example, L'a' + L'\u0301' can be combined to L'Γ‘' β€” iconic behavior, honestly πŸ‘‘

if the *_is_from_primary pointers are non-NULL, they get set to true when the corresponding wide character exists in the primary font. and if one of them is false, that means nope, it does not exist in the primary font, and fcft_codepoint_rasterize() will pick the glyph from one of the fallback fonts instead 🧚✨

so yeah, those bools are basically a vibe check for "did this actually come from the primary font or did we have to call in the understudies" 🎭

⭐ RETURN VALUE ⭐

on success, fcft_precompose() returns the composed wide character β€” slay πŸ’…

on error, (uint32_t)-1 is returned 😭 (yes that's the "it didn't work out" number, don't @ me)


🌈 SEE ALSO 🌈

  • fcft_codepoint_rasterize()
  • fcft_kerning()

go read those next bestie, they're lowkey besties with this function 🫢


and that's the whole page!! this one's from fcft 3.3.3, dated 2026-04-09 β€” mwah, take care, and remember: compose responsibly πŸ’œπŸŽ€πŸŒΈ

πŸ“¦ where this page comes from