1fcft_grapheme_rasterize(3) fcft fcft_grapheme_rasterize(3)
2
3
4
6 fcft_grapheme_rasterize - rasterize a glyph for a grapheme cluster
7
9 #include <fcft/fcft.h>
10
11 const struct fcft_grapheme *fcft_grapheme_rasterize(
12 struct fcft_font *font, size_t len, const wchar_t grapheme_clus‐
13 ter[static len], size_t tag_count, const struct fcft_layout_tag
14 tags[static tag_count], enum fcft_subpixel subpixel);
15
17 fcft_grapheme_rasterize() rasterizes the grapheme cluster cluster using
18 the primary font, or one of the fallback fonts, in font.
19
20 The fonts are searched for all codepoints in the grapheme cluster,
21 starting with the primary font and then the custom fallback fonts, and
22 finally the FontConfig provided fallback fonts.
23
24 tags is an optional array of OTF tags that will be used when shaping
25 the grapheme:
26
27 struct fcft_layout_tag {
28 char tag[4];
29 unsigned value;
30 };
31
32 subpixel allows you to specify which subpixel mode to use. See
33 fcft_glyph_rasterize(3) for details.
34
36 On error, NULL is returned.
37
38 On success, a pointer to a rasterized grapheme is returned. The
39 grapheme is cached in fcft, making subsequent calls with the same argu‐
40 ments very fast (i.e. there is no need for programs to cache glyphs by
41 themselves).
42
43 The grapheme object is managed by font. There is no need to explicitly
44 free it; it is freed when font is destroyed (with fcft_destroy(3)).
45
46 struct fcft_grapheme {
47 int cols;
48
49 size_t count;
50 const struct fcft_glyph **glyphs;
51 };
52
53 cols is the number of "columns" the grapheme occupised (effectively) wc
54 is the same wc from the fcft_glyph_rasterize() call.
55
56 cols is the number of "columns" the glyph occupies (effectively, wc‐
57 swidth(cluster)).
58
59 glyphs is an array of rasterized glyphs. See fcft_glyph_rasterize(3)
60 for a description of struct fcft_glyph.
61
63 fcft_destroy(3), fcft_glyph_rasterize(3)
64
65
66
672.3.3 2021-04-14 fcft_grapheme_rasterize(3)