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 newfcft_fontobject. slay β¨ - On error,
NULLis 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
- alpine 3.24: fcft-doc 3.3.3-r0 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms