fcft_grapheme_rasterize(3) | fcft | fcft_grapheme_rasterize(3) |
fcft_grapheme_rasterize - rasterize a glyph for a grapheme cluster
#include <fcft/fcft.h>
const struct fcft_grapheme *fcft_grapheme_rasterize(
fcft_grapheme_rasterize() rasterizes the grapheme cluster cluster using the primary font, or one of the fallback fonts, in font.
The fonts are searched for all codepoints in the grapheme cluster, starting with the primary font and then the custom fallback fonts, and finally the FontConfig provided fallback fonts.
tags is an optional array of OTF tags that will be used when shaping the grapheme:
struct fcft_layout_tag {
char tag[4];
unsigned value; };
subpixel allows you to specify which subpixel mode to use. See fcft_glyph_rasterize(3) for details.
On error, NULL is returned.
On success, a pointer to a rasterized grapheme is returned. The grapheme is cached in fcft, making subsequent calls with the same arguments very fast (i.e. there is no need for programs to cache glyphs by themselves).
The grapheme object is managed by font. There is no need to explicitly free it; it is freed when font is destroyed (with fcft_destroy(3)).
struct fcft_grapheme {
int cols;
size_t count;
const struct fcft_glyph **glyphs; };
cols is the number of "columns" the grapheme occupised (effectively) wc is the same wc from the fcft_glyph_rasterize() call.
cols is the number of "columns" the glyph occupies (effectively, wcswidth(cluster)).
glyphs is an array of rasterized glyphs. See fcft_glyph_rasterize(3) for a description of struct fcft_glyph.
2020-11-07 | 2.3.1 |