Learn R Programming

RGtk2 (version 2.20.31)

cairo-font-options: cairo_font_options_t

Description

How a font should be rendered

Arguments

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

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

References

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