cairo-font-options: cairo_font_options_t

Description Methods and Functions Detailed Description Structures Convenient Construction Enums and Flags Author(s) References

Description

How a font should be rendered

Methods and Functions

cairoFontOptionsCreate()
cairoFontOptionsCopy(original)
cairoFontOptionsStatus(options)
cairoFontOptionsMerge(options, other)
cairoFontOptionsEqual(options, other)
cairoFontOptionsSetAntialias(options, antialias)
cairoFontOptionsGetAntialias(options)
cairoFontOptionsSetSubpixelOrder(options, subpixel.order)
cairoFontOptionsGetSubpixelOrder(options)
cairoFontOptionsSetHintStyle(options, hint.style)
cairoFontOptionsGetHintStyle(options)
cairoFontOptionsSetHintMetrics(options, hint.metrics)
cairoFontOptionsGetHintMetrics(options)
cairoFontOptions()

Detailed Description

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.

Structures

CairoFontOptions

An opaque structure holding all options that are used when rendering fonts.

Individual features of a CairoFontOptions can be set or accessed using functions named cairo_font_options_set_feature_name and cairo_font_options_get_feature_name, like cairoFontOptionsSetAntialias and cairoFontOptionsGetAntialias.

New features may be added to a CairoFontOptions in the future. For this reason, cairoFontOptionsCopy, cairoFontOptionsEqual, cairoFontOptionsMerge, and cairoFontOptionsHash() should be used to copy, check for equality, merge, or compute a hash value of CairoFontOptions objects.

Convenient Construction

cairoFontOptions is the equivalent of cairoFontOptionsCreate.

Enums and Flags

CairoSubpixelOrder

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.

default

Use the default subpixel order for for the target device

rgb

Subpixel elements are arranged horizontally with red at the left

bgr

Subpixel elements are arranged horizontally with blue at the left

vrgb

Subpixel elements are arranged vertically with red at the top

vbgr

Subpixel elements are arranged vertically with blue at the top

CairoHintStyle

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.

New entries may be added in future versions.

default

Use the default hint style for font backend and target device

none

Do not hint outlines

slight

Hint outlines slightly to improve contrast while retaining good fidelity to the original shapes.

medium

Hint outlines with medium strength giving a compromise between fidelity to the original shapes and contrast

full

Hint outlines to maximize contrast

CairoHintMetrics

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.

default

Hint metrics in the default manner for the font backend and target device

off

Do not hint font metrics

on

Hint font metrics

Author(s)

Derived by RGtkGen from GTK+ documentation

References

https://www.cairographics.org/manual/cairo-cairo-font-options-t.html


RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.