FontOption

The font options specify how fonts should be rendered. Most of the time the font options implied by a surface are just right and do not need any changes, but for pixel-based targets tweaking font options may result in superior output on a particular display.

Constructors

this
this(cairo_font_options_t* cairo_font_options)

Sets our main struct and passes it to the parent class

Members

Functions

copy
FontOption copy()

Allocates a new font options object copying the option values from original. Since 1.0

destroy
void destroy()

Destroys a cairo_font_options_t object created with cairo_font_options_create() or cairo_font_options_copy(). Since 1.0

equal
cairo_bool_t equal(FontOption other)

Compares two font options objects for equality. Since 1.0

getAntialias
cairo_antialias_t getAntialias()

Gets the antialiasing mode for the font options object. Since 1.0

getFontOptionStruct
cairo_font_options_t* getFontOptionStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getHintMetrics
cairo_hint_metrics_t getHintMetrics()

Gets the metrics hinting mode for the font options object. See the documentation for cairo_hint_metrics_t for full details. Since 1.0

getHintStyle
cairo_hint_style_t getHintStyle()

Gets the hint style for font outlines for the font options object. See the documentation for cairo_hint_style_t for full details. Since 1.0

getStruct
void* getStruct()

the main Gtk struct as a void*

getSubpixelOrder
cairo_subpixel_order_t getSubpixelOrder()

Gets the subpixel order for the font options object. See the documentation for cairo_subpixel_order_t for full details. Since 1.0

hash
ulong hash()

Compute a hash for the font options object; this value will be useful when storing an object containing a cairo_font_options_t in a hash table. Since 1.0

merge
void merge(FontOption other)

Merges non-default options from other into options, replacing existing values. This operation can be thought of as somewhat similar to compositing other onto options with the operation of CAIRO_OPERATOR_OVER. Since 1.0

setAntialias
void setAntialias(cairo_antialias_t antialias)

Sets the antialiasing mode for the font options object. This specifies the type of antialiasing to do when rendering text. Since 1.0

setHintMetrics
void setHintMetrics(cairo_hint_metrics_t hintMetrics)

Sets the metrics hinting mode for the font options object. This controls whether metrics are quantized to integer values in device units. See the documentation for cairo_hint_metrics_t for full details. Since 1.0

setHintStyle
void setHintStyle(cairo_hint_style_t hintStyle)

Sets the hint style for font outlines for the font options object. This controls whether to fit font outlines to the pixel grid, and if so, whether to optimize for fidelity or contrast. See the documentation for cairo_hint_style_t for full details. Since 1.0

setSubpixelOrder
void setSubpixelOrder(cairo_subpixel_order_t subpixelOrder)

Sets the subpixel order for the font options object. The subpixel order specifies the order of color elements within each pixel on the display device when rendering with an antialiasing mode of CAIRO_ANTIALIAS_SUBPIXEL. See the documentation for cairo_subpixel_order_t for full details. Since 1.0

status
cairo_status_t status()

Checks whether an error has previously occurred for this font options object Since 1.0

Static functions

create
FontOption create()

Allocates a new font options object with all options initialized to default values. Since 1.0

Variables

cairo_font_options
cairo_font_options_t* cairo_font_options;

the main Gtk struct

Meta