fcft\_clone(3) fcft fcft\_clone(3)

# [NAME](#NAME)

fcft\_clone - copy an already instantiated font

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;fcft/fcft.h&gt;**

**struct fcft\_font \*fcft\_clone(const struct fcft\_font \*font);**

# [DESCRIPTION](#DESCRIPTION)

**fcft\_clone**() creates a new instance by copying *font*. fcft internally uses reference counting, making this operation very fast (much faster than explicitly instantiating a new font using **fcft\_from\_name**()).

To free all resources associated with the both the original font, and the cloned font, **fcft\_destroy**() must be called for **both** the original font, **and** the clone.

# [RETURN VALUE](#RETURN_VALUE)

On success, **fcft\_clone**() returns a pointer to a new **fcft\_font** object. On error, NULL is returned.

# [SEE ALSO](#SEE_ALSO)

**fcft\_from\_name**(), **fcft\_from\_name2**(), **fcft\_destroy**()

2026-10-30 3.3.3

---

Document: fcft_clone(3) from fcft 3.3.3-r6 (Chainguard OS)
Source: https://codeberg.org/dnkl/fcft
