fcft\_kerning(3) fcft fcft\_kerning(3)

# [NAME](#NAME)

fcft\_kerning - calculate kerning distance between two wide characters

# [SYNOPSIS](#SYNOPSIS)

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

**bool fcft\_kerning(**

**struct fcft\_font \*font, uint32\_t left, uint32\_t right,** **long \*restrict x, long \*restrict y);**

# [DESCRIPTION](#DESCRIPTION)

**fcft\_kerning**() calculates the kerning distances *x* (horizontal) and *y* (vertical) between the two wide characters *left* and *right*, in pixels.

Both characters must exist in the primary font.

**fcft\_kerning**() is just a convenience function around **FT\_Get\_Kerning**() and as such, it only supports legacy *kern* tables. In particular, OpenType fonts' *GPOS* tables are **not** supported. fcft is not a text shaping library.

# [RETURN VALUE](#RETURN_VALUE)

On success, **fcft\_kerning**() returns true, and *x* and *y* are updated with the kerning distance, in pixels.

On error, false is returned. This may happen for several reasons:

- The primary font does not have any kerning information.
- One, or both, of the two characters have no corresponding glyph in the primary font.
- There is no kerning information for this character combination.

# [EXAMPLE](#EXAMPLE)

See **fcft\_from\_name**()

2026-10-23 3.3.3

---

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