fcft_kerning(3)
π fcft_kerning β the "how close do these two letters wanna be" function π
okay so bestie, this page lives in the fcft manual (section 3, the library-call girlies β¨), and it's all about one little function called fcft_kerning. no cap, it's short but it's important. let's get into it π«Ά
β¨ NAME β¨
fcft_kerning β literally calculates the kerning distance between two wide characters π
π SYNOPSIS π
#include <fcft/fcft.h>
bool fcft_kerning(
struct fcft_font *font, uint32_t left, uint32_t right, long
*restrict x, long *restrict y);
π¦ DESCRIPTION π¦
so fcft_kerning() computes the kerning distances β x (horizontal, the side-to-side one) and y (vertical, the up-and-down one) β between the two wide characters left and right, and it gives you those distances in pixels, periodt.
both characters must exist in the primary font. like, must must. π
and here's the tea, bestie: fcft_kerning() is just a convenience function wrapping around FT_Get_Kerning(), which means it only supports legacy kern tables. if you were hoping for OpenType fonts' GPOS tables β nope, not supported, sorry babe π. fcft is not a text shaping library, and it's not trying to be. she's got main character energy in her own lane, iykyk.
π₯ RETURN VALUE π₯
on success, fcft_kerning() returns true, and x and y get updated with the kerning distance, in pixels. slay. β¨
on error, false is returned. and there's a whole list of reasons why that can happen, so let's do a vibe check π:
- 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 πΈ
see fcft_from_name() β yeah she's the one with the actual example, go look at her π
ngl this one is a tiny page but it ate. remember: legacy kern tables only, both glyphs gotta exist, and false is just the function telling you the vibe wasn't there π
β¨ that's the whole page, bestie β¨ β brought to you by fcft 3.3.3, dated 2026-04-09, and the fcft_kerning(3) header/footer duo. mwah πππ
π¦ 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