fcft_rasterize_text_run_utf32(3)
okay so bestie, welcome to the fcft_rasterize_text_run_utf32(3) page from the fcft manual π this one is all about turning a whole UTF-32 string into a text run, and it's lowkey iconic.
πΈ NAME πΈ
fcft_rasterize_text_run_utf32 β rasterize a series of glyphs for a text string β¨
β¨ SYNOPSIS β¨
#include <fcft/fcft.h>
struct fcft_text_run *fcft_rasterize_text_run_utf32(
struct fcft_font *font, size_t len, const uint32_t text[static len],
enum fcft_subpixel subpixel);
π DESCRIPTION π
fcft_rasterize_text_run_utf32() shapes and rasterizes the UTF-32 encoded Unicode string text into a series of glyphs, using the primary font β and possibly one or more fallback fonts β in font π«Ά
The subpixel argument lets you specify which subpixel mode to use. See fcft_rasterize_char_utf32() for the deets π
Here's the whole glow-up pipeline, bestie:
- The string is first segmented into grapheme clusters using
utf8procπ§ - Each grapheme is assigned a font using the normal font lookup rules (see
fcft_rasterize_char_utf32()) π - Next,
HarfBuzzis used to guess each grapheme's script (~language) π₯ - Consecutive graphemes that both have been assigned the same font, and belong to the same script, are merged into a "partial" text run π
- Finally, each partial text run is shaped with
HarfBuzzπ
π RETURN VALUE π
On error, NULL is returned π
On success, you get a pointer to a dynamically allocated text-run:
struct fcft_text_run {
const struct fcft_glyph **glyphs;
int *cluster;
size_t count;
};
Both glyphs and cluster are arrays with count elements. cluster contains the character offsets (in the original string) of each corresponding glyph β
heads up: the glyphs' cols member are invalid β do not trust it π
The text-run is not cached in fcft. The calling application may cache it for as long as it likes, including after the font has been destroyed π«Ά
The text-run must be free:d with fcft_text_run_destroy() π§
π¦ SEE ALSO π¦
fcft_text_run_destroy()fcft_rasterize_char_utf32()fcft_rasterize_grapheme_utf32()
that's the whole vibe, bestie β brought to you by fcft version 3.3.3, dated 2026-04-09, signing off π«Άβ¨
π¦ 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