1fcft_rasterize_grapheme_utf32(3) fcft fcft_rasterize_grapheme_utf32(3)
2
3
4
6 fcft_rasterize_grapheme_utf32 - rasterize glyph(s) for a grapheme
7 cluster
8
10 #include <fcft/fcft.h>
11
12 const struct fcft_grapheme *fcft_rasterize_grapheme_utf32(
13 struct fcft_font *font, size_t len, const uint32_t grapheme_clus‐
14 ter[static len], enum fcft_subpixel subpixel);
15
17 fcft_rasterize_grapheme_utf32() rasterizes the grapheme cluster cluster
18 using the primary font, or one of the fallback fonts, in font.
19
20 Each cluster element is an UTF-32 encoded Unicode codepoint.
21
22 The fonts are searched for all codepoints in the grapheme cluster,
23 starting with the primary font and then the custom fallback fonts, and
24 finally the FontConfig provided fallback fonts.
25
26 subpixel allows you to specify which subpixel mode to use. See
27 fcft_rasterize_char_utf32() for details.
28
30 On error, NULL is returned.
31
32 On success, a pointer to a rasterized grapheme is returned. The
33 grapheme is cached in fcft, making subsequent calls with the same argu‐
34 ments very fast (i.e. there is no need for programs to cache glyphs by
35 themselves).
36
37 The grapheme object is managed by font. There is no need to explicitly
38 free it; it is freed when font is destroyed (with fcft_destroy()).
39
40 struct fcft_grapheme {
41 int cols;
42
43 size_t count;
44 const struct fcft_glyph **glyphs;
45 };
46
47 cols is the number of "columns" the glyph occupies (effectively, wc‐
48 swidth(cluster)).
49
50 glyphs is an array of count rasterized glyphs. See fcft_raster‐
51 ize_char_utf32() for a description of struct fcft_glyph.
52
54 fcft_destroy(), fcft_rasterize_char_utf32(), fcft_raster‐
55 ize_text_run_utf32()
56
57
58
593.1.6 2023-07-14 fcft_rasterize_grapheme_utf32(3)