Next: FreeType Fonts, Previous: Scaled Fonts, Up: Top [Index]
How a font should be rendered
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.
<cairo-font-options-t >
)Allocates a new font options object with all options initialized to default values.
a newly allocated <cairo-font-options-t>
. Free with
cairo-font-options-destroy
. This function always returns a valid
pointer; if memory cannot be allocated, then a special error object is
returned where all operations on the object do nothing. You can check
for this with cairo-font-options-status
.
<cairo-font-options-t>
) ⇒ (ret <cairo-font-options-t >
)Allocates a new font options object copying the option values from original.
a <cairo-font-options-t>
a newly allocated <cairo-font-options-t>
. Free with
cairo-font-options-destroy
. This function always returns a valid
pointer; if memory cannot be allocated, then a special error object is
returned where all operations on the object do nothing. You can check
for this with cairo-font-options-status
.
<cairo-font-options-t>
) (other <cairo-font-options-t>
)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_OPERATION_OVER’.
a <cairo-font-options-t>
another <cairo-font-options-t>
<cairo-font-options-t>
) ⇒ (ret <unsigned long>
)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.
a <cairo-font-options-t>
the hash value for the font options object. The return value can be cast to a 32-bit type if a 32-bit hash value is needed.
<cairo-font-options-t>
) (antialias <cairo-antialias-t>
)Sets the antialiasing mode for the font options object. This specifies the type of antialiasing to do when rendering text.
a <cairo-font-options-t>
the new antialiasing mode
<cairo-font-options-t>
) ⇒ (ret <cairo-antialias-t>
)Gets the antialiasing mode for the font options object.
a <cairo-font-options-t>
the antialiasing mode
<cairo-font-options-t>
) (hint-style <cairo-hint-style-t>
)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.
a <cairo-font-options-t>
the new hint style
<cairo-font-options-t>
) ⇒ (ret <cairo-hint-style-t>
)Gets the hint style for font outlines for the font options object. See
the documentation for <cairo-hint-style-t>
for full details.
a <cairo-font-options-t>
the hint style for the font options object
<cairo-font-options-t>
) (hint-metrics <cairo-hint-metrics-t>
)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.
a <cairo-font-options-t>
the new metrics hinting mode
Next: FreeType Fonts, Previous: Scaled Fonts, Up: Top [Index]