Cairo::FontOptions#

📦 std

Functions#

Other Functions#

create#

Creates a font options object with everything at its default (cairo_font_options_create): Cairo::FontOptions->create. Takes no arguments.

status#

Returns the font options’ error status as a nickname string, success when they are usable.

merge#

Merges $other into $opts in place: every option that $other sets to something other than its default replaces the one in $opts. The argument is required. Returns nothing.

equal#

Returns true if $opts and $other hold the same settings. The argument is required.

hash#

Returns a hash value for the options, computed from the settings they hold, for use as a key when caching option objects.

set_color_mode#

Sets whether color glyphs are used when the font has them: default, no-color or color. Needs libcairo 1.18 or newer, and croaks with Cairo: set_color_mode requires cairo >= 1.18 on anything older.

get_color_mode#

Returns the color-glyph mode as a nickname string. Needs libcairo 1.18 or newer, and croaks with Cairo: get_color_mode requires cairo >= 1.18 on anything older.

set_color_palette#

Chooses which color palette a color font uses, by index; 0 is the font’s default palette. Needs libcairo 1.18 or newer, and croaks with Cairo: set_color_palette requires cairo >= 1.18 on anything older.

get_color_palette#

Returns the index of the color palette in use. Needs libcairo 1.18 or newer, and croaks with Cairo: get_color_palette requires cairo >= 1.18 on anything older.

set_custom_palette_color#

Overrides one entry of the color palette: $opts->set_custom_palette_color($index, $r, $g, $b, $a). All five arguments are required. Needs libcairo 1.18 or newer, and croaks with Cairo: set_custom_palette_color requires cairo >= 1.18 on anything older.

get_custom_palette_color#

Reads back one overridden palette entry, returning the list ($status, $r, $g, $b, $a). The status nickname comes first and is success only when that entry has been overridden - an index with no override yields invalid-index, and the four components are then meaningless. Needs libcairo 1.18 or newer, and croaks with Cairo: get_custom_palette_color requires cairo >= 1.18 on anything older.