fcft_clone(3)

πŸ’… fcft_clone(3) β€” the fcft manual, bestie edition πŸŽ€

okay so this is the page for fcft_clone, which lives in the fcft manual, and honestly? it's a little bop. short, sweet, does exactly one thing and does it iconically ✨


🌸 NAME 🌸

fcft_clone β€” copy an already instantiated font. that's it. that's the whole job. copying a font you already made. easy. periodt πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <fcft/fcft.h>

struct fcft_font *fcft_clone(const struct fcft_font *font);

like, you include the header, you call the function, you get a font back. no cap, it's that simple πŸ™ˆ


⭐ DESCRIPTION ⭐

okay bestie, listen up: fcft_clone() creates a new instance by copying font. and here's the part that's giving main character energy β€” fcft internally uses reference counting, which means this operation is very fast. like, much faster than explicitly instantiating a new font using fcft_from_name(). not me being obsessed with how snappy that is 😭πŸ”₯

but here's the important bit, and I need you to actually read this one, fr fr: to free all resources associated with both the original font and the cloned font, fcft_destroy() must be called for both the original font and the clone. both of them. two calls. the original one doesn't get to skip out just because it got cloned πŸ‘‘

⚠️ like lowkey do not forget the second fcft_destroy() β€” the clone has its own ref to clean up and it's not gonna clean itself up. two fonts, two destroys. iykyk πŸ’€

πŸ’œ RETURN VALUE πŸ’œ

  • On success, fcft_clone() returns a pointer to a new fcft_font object. slay ✨
  • On error, NULL is returned. which is the vibe check failing, but at least it's documented 🫢

🌈 SEE ALSO 🌈

  • fcft_from_name()
  • fcft_from_name2()
  • fcft_destroy()

go read those too, they're all part of the same little family 🧚


and that's the page!! πŸ’… cute little sign-off real quick: this was fcft 3.3.3, dated 2026-04-09, and the page is fcft_clone(3) β€” mwah, bye bestie, go free your fonts πŸ“πŸ’–

πŸ“¦ where this page comes from