.\" Generated by scdoc 1.11.3 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "fcft_font_options_create" "3" "2025-03-06" "3.2.0" "fcft" .PP .SH NAME .PP fcft_font_options_create - instantiate a new font .PP .SH SYNOPSIS .PP \fB#include \fR .PP \fBstruct fcft_font_options *fcft_font_options_create(\fR\fIvoid\fR\fB);\fR .PP .SH DESCRIPTION .PP \fBfcft_font_options_create\fR() allocates a \fBstruct fcft_font_options\fR object to be used with \fBfcft_from_name2\fR(3).\& .PP The returned object will be initialized with default values.\& Manually set struct members to override.\& .PP Note: you \fBmust\fR use \fBfcft_font_options_create\fR() to allocate the \fIoptions\fR object; do \fBnot\fR allocate it yourself, neither from the heap or on the stack.\& This is to ensure forward compatibility.\& .PP .nf .RS 4 struct fcft_font_options { enum fcft_emoji_presentation emoji_presentation; struct { bool srgb_decode; pixman_format_code_t format; } color_glyphs; uint32_t reserved; }; .fi .RE .PP .SH EMOJI PRESENTATION .PP \fIemoji_presentation\fR configures the default presentation style to use with emojis with both a text presentation, and an emoji presentation style.\& .PP These emojis can be followed by an (invisible) variation selector.\& When they are not followed by a selector, the implementation must choose a style.\& .PP One example of such an emoji is U+263A - WHITE SMILING FACE: .PP .PD 0 .IP \(bu 4 unqualified: ☺ .IP \(bu 4 text: ☺ .IP \(bu 4 emoji: ☺️ .PD .PP The Unicode standard defines the default presentation styles, and this is what fcft defaults to.\& .PP However, in some cases, the application may want to always use either the text style, or the emoji style.\& .PP This is what \fIemoji_presentation\fR is for.\& Possible values are: .PP .PD 0 .IP \(bu 4 \fBFCFT_EMOJI_PRESENTATION_DEFAULT\fR .IP \(bu 4 \fBFCFT_EMOJI_PRESENTATION_TEXT\fR .IP \(bu 4 \fBFCFT_EMOJI_PRESENTATION_EMOJI\fR .PD .PP To re-iterate; this setting affects emoji'\&s without an explicit variation selector.\& In other words, it overrides the \fBdefault\fR presentation style.\& .PP \fBFCFT_EMOJI_PRESENTATION_DEFAULT\fR is the default, and causes fcft to use the default presentation as defined by Unicode.\& .PP \fBFCFT_EMOJI_PRESENTATION_TEXT\fR forces all multi-presentation style emojis to be rendered in their text presentation style.\& .PP \fBFCFT_EMOJI_PRESENTATION_EMOJI\fR forces all multi-presentation style emojis to be rendered in their emoji presentation style.\& .PP .SH COLOR GLYPHS .PP \fIsrgb_decode\fR: when true, the pixel data will be decoded from sRGB to linear space.\& When false (the default), the pixel data is used as is.\& .PP \fIformat\fR defines the pixman surface format to use for color glyphs.\& The default is \fBPIXMAN_a8r8g8b8\fR.\& One use is to enable higher color precision when \fIsrgb_decode\fR is enabled, to avoid loss of precision when decoding from sRGB.\& .PP .SH SEE ALSO .PP \fBfcft_from_name2\fR(), \fBfcft_font_options_destroy\fR()