Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
fcft_font_options_create(3)	      fcft	     fcft_font_options_create(3)

NAME
     fcft_font_options_create - instantiate a new font

SYNOPSIS
     #include <fcft/fcft.h>

     struct fcft_font_options *fcft_font_options_create(void);

DESCRIPTION
     fcft_font_options_create()  allocates  a struct fcft_font_options object to
     be used with fcft_from_name2(3).

     The returned object will be initialized with default values.  Manually  set
     struct members to override.

     Note:  you  must use fcft_font_options_create() to allocate the options ob-
     ject; do not allocate it yourself, neither from the heap or on  the  stack.
     This is to ensure forward compatibility.

	 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
     Configures  the  filter  the  use	when downscaling bitmap fonts (typically
     emoji fonts).

     Possible values are:

     *	 FCFT_SCALING_FILTER_NONE
     *	 FCFT_SCALING_FILTER_NEAREST
     *	 FCFT_SCALING_FILTER_BILINEAR
     *	 FCFT_SCALING_FILTER_IMPULSE
     *	 FCFT_SCALING_FILTER_BOX
     *	 FCFT_SCALING_FILTER_LINEAR
     *	 FCFT_SCALING_FILTER_CUBIC
     *	 FCFT_SCALING_FILTER_GAUSSIAN
     *	 FCFT_SCALING_FILTER_LANCZOS2
     *	 FCFT_SCALING_FILTER_LANCZOS3
     *	 FCFT_SCALING_FILTER_LANCZOS3_STRETCHED

     FCFT_SCALING_FILTER_NONE disables filtering.

     FCFT_SCALING_FILTER_NEAREST  and  FCFT_SCALING_FILTER_BILINEAR  are  tradi-
     tional filters, with nearest being the fastest.

     The rest are separable convolution filters.

     The default is FCFT_SCALING_FILTER_CUBIC.

EMOJI PRESENTATION
     emoji_presentation  configures  the  default presentation style to use with
     emojis with both a text presentation, and an emoji presentation style.

     These emojis can be followed by an  (invisible)  variation  selector.  When
     they  are	not  followed  by  a  selector, the implementation must choose a
     style.

     One example of such an emoji is U+263A - WHITE SMILING FACE:

     *	 unqualified: ao
     *	 text: ao
     *	 emoji: aoi,

     The Unicode standard defines the default presentation styles, and	this  is
     what fcft defaults to.

     However,  in  some cases, the application may want to always use either the
     text style, or the emoji style.

     This is what emoji_presentation is for. Possible values are:

     *	 FCFT_EMOJI_PRESENTATION_DEFAULT
     *	 FCFT_EMOJI_PRESENTATION_TEXT
     *	 FCFT_EMOJI_PRESENTATION_EMOJI

     To re-iterate; this setting affects emoji's 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  de-
     fault  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()

3.3.3				   2026-08-27	     fcft_font_options_create(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=fcft_font_options_create&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help