cairomm
1.14.2
|
The font options specify how fonts should be rendered. More...
#include <cairomm/fontoptions.h>
Public Types | |
typedef cairo_font_options_t | cobject |
Public Member Functions | |
FontOptions () | |
FontOptions (cairo_font_options_t*cobject, bool take_ownership=false) | |
FontOptions (const FontOptions& src) | |
virtual | ~FontOptions () |
FontOptions& | operator= (const FontOptions& src) |
bool | operator== (const FontOptions& src) const |
void | merge (const FontOptions& other) |
Merges non-default options from other into this, replacing existing values. More... | |
unsigned long | hash () const |
Compute a hash for the font options object; this value will be useful when storing an object containing a FontOptions in a hash table. More... | |
void | set_antialias (Antialias antialias) |
Sets the antialiasing mode for the font options object. More... | |
Antialias | get_antialias () const |
Gets the antialiasing mode for the font options object. More... | |
void | set_subpixel_order (SubpixelOrder subpixel_order) |
Sets the subpixel order for the font options object. More... | |
SubpixelOrder | get_subpixel_order () const |
Gets the subpixel order for the font options object. More... | |
void | set_hint_style (HintStyle hint_style) |
Sets the hint style for font outlines for the font options object. More... | |
HintStyle | get_hint_style () const |
Gets the hint style for font outlines for the font options object. More... | |
void | set_hint_metrics (HintMetrics hint_metrics) |
Sets the metrics hinting mode for the font options object. More... | |
HintMetrics | get_hint_metrics () const |
Gets the metrics hinting mode for the font options object. More... | |
cobject* | cobj () |
const cobject* | cobj () const |
Protected Attributes | |
cobject* | m_cobject |
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.
typedef cairo_font_options_t Cairo::FontOptions::cobject |
Cairo::FontOptions::FontOptions | ( | ) |
|
explicit |
Cairo::FontOptions::FontOptions | ( | const FontOptions& | src | ) |
|
virtual |
|
inline |
|
inline |
Antialias Cairo::FontOptions::get_antialias | ( | ) | const |
Gets the antialiasing mode for the font options object.
HintMetrics Cairo::FontOptions::get_hint_metrics | ( | ) | const |
Gets the metrics hinting mode for the font options object.
See the documentation for HintMetrics for full details.
Return value: the metrics hinting mode for the font options object.
HintStyle Cairo::FontOptions::get_hint_style | ( | ) | const |
Gets the hint style for font outlines for the font options object.
See the documentation for HintStyle for full details.
SubpixelOrder Cairo::FontOptions::get_subpixel_order | ( | ) | const |
Gets the subpixel order for the font options object.
See the documentation for SubpixelOrder for full details.
unsigned long Cairo::FontOptions::hash | ( | ) | const |
Compute a hash for the font options object; this value will be useful when storing an object containing a FontOptions in a hash table.
void Cairo::FontOptions::merge | ( | const FontOptions& | other | ) |
Merges non-default options from other into this, replacing existing values.
This operation can be thought of as somewhat similar to compositing other onto this with the operation of OPERATION_OVER.
other | another FontOptions |
FontOptions& Cairo::FontOptions::operator= | ( | const FontOptions& | src | ) |
bool Cairo::FontOptions::operator== | ( | const FontOptions& | src | ) | const |
void Cairo::FontOptions::set_antialias | ( | Antialias | antialias | ) |
Sets the antialiasing mode for the font options object.
This specifies the type of antialiasing to do when rendering text.
antialias | the new antialiasing mode. |
void Cairo::FontOptions::set_hint_metrics | ( | HintMetrics | hint_metrics | ) |
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 HintMetrics for full details.
hint_metrics | the new metrics hinting mode. |
void Cairo::FontOptions::set_hint_style | ( | HintStyle | hint_style | ) |
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 HintStyle for full details.
hint_style | the new hint style. |
void Cairo::FontOptions::set_subpixel_order | ( | SubpixelOrder | subpixel_order | ) |
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 SubpixelOrder for full details.
subpixel_order | the new subpixel order. |
|
protected |