![]() |
![]() |
![]() |
Cairo: A Vector Graphics Library | ![]() |
---|---|---|---|---|
typedef cairo_font_options_t; cairo_font_options_t* cairo_font_options_create (void); cairo_font_options_t* cairo_font_options_copy (const cairo_font_options_t *original); void cairo_font_options_destroy (cairo_font_options_t *options); cairo_status_t cairo_font_options_status (cairo_font_options_t *options); void cairo_font_options_merge (cairo_font_options_t *options, const cairo_font_options_t *other); unsigned long cairo_font_options_hash (const cairo_font_options_t *options); cairo_bool_t cairo_font_options_equal (const cairo_font_options_t *options, const cairo_font_options_t *other); void cairo_font_options_set_antialias (cairo_font_options_t *options, cairo_antialias_t antialias); cairo_antialias_t cairo_font_options_get_antialias (const cairo_font_options_t *options); enum cairo_subpixel_order_t; void cairo_font_options_set_subpixel_order (cairo_font_options_t *options, cairo_subpixel_order_t subpixel_order); cairo_subpixel_order_t cairo_font_options_get_subpixel_order (const cairo_font_options_t *options); enum cairo_hint_style_t; void cairo_font_options_set_hint_style (cairo_font_options_t *options, cairo_hint_style_t hint_style); cairo_hint_style_t cairo_font_options_get_hint_style (const cairo_font_options_t *options); enum cairo_hint_metrics_t; void cairo_font_options_set_hint_metrics (cairo_font_options_t *options, cairo_hint_metrics_t hint_metrics); cairo_hint_metrics_t cairo_font_options_get_hint_metrics (const cairo_font_options_t *options);
cairo_font_options_t* cairo_font_options_copy (const cairo_font_options_t *original);
cairo_status_t cairo_font_options_status (cairo_font_options_t *options);
void cairo_font_options_merge (cairo_font_options_t *options, const cairo_font_options_t *other);
unsigned long cairo_font_options_hash (const cairo_font_options_t *options);
cairo_bool_t cairo_font_options_equal (const cairo_font_options_t *options, const cairo_font_options_t *other);
void cairo_font_options_set_antialias (cairo_font_options_t *options, cairo_antialias_t antialias);
cairo_antialias_t cairo_font_options_get_antialias (const cairo_font_options_t *options);
typedef enum _cairo_subpixel_order { CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_SUBPIXEL_ORDER_RGB, CAIRO_SUBPIXEL_ORDER_BGR, CAIRO_SUBPIXEL_ORDER_VRGB, CAIRO_SUBPIXEL_ORDER_VBGR } cairo_subpixel_order_t;
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
.
void cairo_font_options_set_subpixel_order (cairo_font_options_t *options, cairo_subpixel_order_t subpixel_order);
cairo_subpixel_order_t cairo_font_options_get_subpixel_order (const cairo_font_options_t *options);
typedef enum _cairo_hint_style { CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_STYLE_NONE, CAIRO_HINT_STYLE_SLIGHT, CAIRO_HINT_STYLE_MEDIUM, CAIRO_HINT_STYLE_FULL } cairo_hint_style_t;
Specifies the type of hinting to do on font outlines. Hinting is the process of fitting outlines to the pixel grid in order to improve the appearance of the result. Since hinting outlines involves distorting them, it also reduces the faithfulness to the original outline shapes. Not all of the outline hinting styles are supported by all font backends.
void cairo_font_options_set_hint_style (cairo_font_options_t *options, cairo_hint_style_t hint_style);
cairo_hint_style_t cairo_font_options_get_hint_style (const cairo_font_options_t *options);
typedef enum _cairo_hint_metrics { CAIRO_HINT_METRICS_DEFAULT, CAIRO_HINT_METRICS_OFF, CAIRO_HINT_METRICS_ON } cairo_hint_metrics_t;
Specifies whether to hint font metrics; hinting font metrics means quantizing them so that they are integer values in device space. Doing this improves the consistency of letter and line spacing, however it also means that text will be laid out differently at different zoom factors.
void cairo_font_options_set_hint_metrics (cairo_font_options_t *options, cairo_hint_metrics_t hint_metrics);
cairo_hint_metrics_t cairo_font_options_get_hint_metrics (const cairo_font_options_t *options);