fcft_font_options_create(3)
π fcft_font_options_create β bestie, let's make a font options object β¨
Okay so this one's from the fcft manual, section 3, and it's literally the glow-up moment where you get a shiny new options object to hand off to fcft_from_name2(3). Slay.
πΈ SYNOPSIS πΈ
#include <fcft/fcft.h>
struct fcft_font_options *fcft_font_options_create(void);
β¨ DESCRIPTION β¨
So fcft_font_options_create() allocates a struct fcft_font_options object, and that object is the one you'll be using with fcft_from_name2(3). That's it, that's the whole job. π
The returned object comes pre-initialized with default values β you just manually set struct members to override whatever you want. Easy.
β οΈ Note, and this is important, bestie: you must use fcft_font_options_create() to allocate the options object. Do not allocate it yourself β not from the heap, not on the stack. This is to ensure forward compatibility. No cap, don't skip this one. π
Here's the struct in all its glory:
struct fcft_font_options {
enum fcft_scaling_filter scaling_filter;
enum fcft_emoji_presentation emoji_presentation;
struct {
bool srgb_decode;
pixman_format_code_t format;
} color_glyphs;
};
π SCALING FILTER π
This one configures the filter to use when downscaling bitmap fonts (typically emoji fonts). Iconic behavior honestly.
Possible values are:
FCFT_SCALING_FILTER_NONEFCFT_SCALING_FILTER_NEARESTFCFT_SCALING_FILTER_BILINEARFCFT_SCALING_FILTER_IMPULSEFCFT_SCALING_FILTER_BOXFCFT_SCALING_FILTER_LINEARFCFT_SCALING_FILTER_CUBICFCFT_SCALING_FILTER_GAUSSIANFCFT_SCALING_FILTER_LANCZOS2FCFT_SCALING_FILTER_LANCZOS3FCFT_SCALING_FILTER_LANCZOS3_STRETCHED
FCFT_SCALING_FILTER_NONE disables filtering. Periodt.
FCFT_SCALING_FILTER_NEAREST and FCFT_SCALING_FILTER_BILINEAR are the traditional filters, and nearest is the fastest of the bunch. πββοΈπ¨
The rest are separable convolution filters. Fancy.
The default is FCFT_SCALING_FILTER_CUBIC. π
π¦ EMOJI PRESENTATION π¦
So emoji_presentation configures the default presentation style to use with emojis that have both a text presentation and an emoji presentation style. Double threat emojis, iykyk.
These emojis can be followed by an (invisible) variation selector. When they're not followed by a selector, the implementation must choose a style. Main character decision, fr fr.
One example of such an emoji is U+263A β WHITE SMILING FACE:
- unqualified: βΊ
- text: βΊ
- emoji: βΊοΈ
The Unicode standard defines the default presentation styles, and that's what fcft defaults to. π€
But sometimes the application may want to always use either the text style or the emoji style. That's literally what emoji_presentation is for. Possible values are:
FCFT_EMOJI_PRESENTATION_DEFAULTFCFT_EMOJI_PRESENTATION_TEXTFCFT_EMOJI_PRESENTATION_EMOJI
To re-iterate (because this part matters bestie): this setting affects emojis without an explicit variation selector. In other words, it overrides the default presentation style.
FCFT_EMOJI_PRESENTATION_DEFAULT is the default, and causes fcft to use the default presentation as defined by Unicode.
FCFT_EMOJI_PRESENTATION_TEXT forces all multi-presentation style emojis to be rendered in their text presentation style.
FCFT_EMOJI_PRESENTATION_EMOJI forces all multi-presentation style emojis to be rendered in their emoji presentation style. π
π COLOR GLYPHS π
srgb_decode: when true, the pixel data will be decoded from sRGB to linear space. When false (the default), the pixel data is used as is.
format defines the pixman surface format to use for color glyphs. The default is PIXMAN_a8r8g8b8. One use is to enable higher color precision when srgb_decode is enabled, to avoid loss of precision when decoding from sRGB. π
π SEE ALSO π
fcft_from_name2()fcft_font_options_destroy()
Okay that's the whole page! π«Ά Cute little sign-off for you: this one's from fcft 3.3.3, dated 2026-04-09, and it's the fcft_font_options_create(3) page. Go forth and allocate responsibly, bestie. πβ¨π
π¦ 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