AdgFontStyle — Font style related stuff
AdgFontStyle; AdgStyle * adg_font_style_new (void); cairo_scaled_font_t * adg_font_style_get_scaled_font (AdgFontStyle *font_style, const AdgMatrix *ctm); void adg_font_style_set_color_dress (AdgFontStyle *font_style, AdgDress dress); AdgDress adg_font_style_get_color_dress (AdgFontStyle *font_style); void adg_font_style_set_family (AdgFontStyle *font_style, const gchar *family); const gchar * adg_font_style_get_family (AdgFontStyle *font_style); void adg_font_style_set_slant (AdgFontStyle *font_style, cairo_font_slant_t slant); cairo_font_slant_t adg_font_style_get_slant (AdgFontStyle *font_style); void adg_font_style_set_weight (AdgFontStyle *font_style, cairo_font_weight_t weight); cairo_font_weight_t adg_font_style_get_weight (AdgFontStyle *font_style); void adg_font_style_set_size (AdgFontStyle *font_style, gdouble size); gdouble adg_font_style_get_size (AdgFontStyle *font_style); void adg_font_style_set_antialias (AdgFontStyle *font_style, cairo_antialias_t antialias); cairo_antialias_t adg_font_style_get_antialias (AdgFontStyle *font_style); void adg_font_style_set_subpixel_order (AdgFontStyle *font_style, cairo_subpixel_order_t subpixel_order); cairo_subpixel_order_t adg_font_style_get_subpixel_order (AdgFontStyle *font_style); void adg_font_style_set_hint_style (AdgFontStyle *font_style, cairo_hint_style_t hint_style); cairo_hint_style_t adg_font_style_get_hint_style (AdgFontStyle *font_style); void adg_font_style_set_hint_metrics (AdgFontStyle *font_style, cairo_hint_metrics_t hint_metrics); cairo_hint_metrics_t adg_font_style_get_hint_metrics (AdgFontStyle *font_style);
"antialias" gint : Read / Write "color-dress" AdgDress : Read / Write "family" gchar* : Read / Write "hint-metrics" gint : Read / Write "hint-style" gint : Read / Write "size" gdouble : Read / Write "slant" gint : Read / Write "subpixel-order" gint : Read / Write "weight" gint : Read / Write
Contains parameters on how to draw texts such as font family, slanting, weight, hinting and so on.
typedef struct _AdgFontStyle AdgFontStyle;
All fields are private and should not be used directly. Use its public methods instead.
AdgStyle * adg_font_style_new (void);
Constructs a new font style initialized with default params.
|
Returns : |
a new font style |
cairo_scaled_font_t * adg_font_style_get_scaled_font (AdgFontStyle *font_style, const AdgMatrix *ctm);
Gets the scaled font of font_style. The returned font is
owned by font_style and must not be destroyed by the caller.
|
|
an AdgFontStyle object |
|
|
the current transformation matrix |
|
Returns : |
the scaled font |
void adg_font_style_set_color_dress (AdgFontStyle *font_style, AdgDress dress);
Sets a new color dress on font_style. The new dress
should be related to the original dress: you cannot
set a dress used for font styles to a dress managing
fonts.
The validation of the new dress is done by calling
adg_dress_are_related() with dress and the previous
dress as arguments: check out its documentation for
details on what is a related dress.
|
|
an AdgFontStyle |
|
|
the new color dress to use |
AdgDress adg_font_style_get_color_dress (AdgFontStyle *font_style);
Gets the color dress used by font_style.
|
|
an AdgFontStyle |
|
Returns : |
the current color dress |
void adg_font_style_set_family (AdgFontStyle *font_style, const gchar *family);
Sets a new family.
|
|
an AdgFontStyle object |
|
|
the new family |
const gchar * adg_font_style_get_family (AdgFontStyle *font_style);
Gets the family of font_style. The returned pointer refers to
internally managed text that must not be modified or freed.
|
|
an AdgFontStyle object |
|
Returns : |
the requested family |
void adg_font_style_set_slant (AdgFontStyle *font_style, cairo_font_slant_t slant);
Sets a new slant variant on font_style.
|
|
an AdgFontStyle object |
|
|
the new slant |
cairo_font_slant_t adg_font_style_get_slant (AdgFontStyle *font_style);
Gets the slant variant of font_style.
|
|
an AdgFontStyle object |
|
Returns : |
the slant variant |
void adg_font_style_set_weight (AdgFontStyle *font_style, cairo_font_weight_t weight);
Sets a new weight variant on font_style.
|
|
an AdgFontStyle object |
|
|
the new weight |
cairo_font_weight_t adg_font_style_get_weight (AdgFontStyle *font_style);
Gets the weight variant of font_style.
|
|
an AdgFontStyle object |
|
Returns : |
the weight variant |
void adg_font_style_set_size (AdgFontStyle *font_style, gdouble size);
Sets a new size (in global space) on font_style.
|
|
an AdgFontStyle object |
|
|
the new size |
gdouble adg_font_style_get_size (AdgFontStyle *font_style);
Gets the size (in global space) of font_style.
|
|
an AdgFontStyle object |
|
Returns : |
the size variant |
void adg_font_style_set_antialias (AdgFontStyle *font_style, cairo_antialias_t antialias);
Sets a new antialias mode.
|
|
an AdgFontStyle object |
|
|
the new antialias mode |
cairo_antialias_t adg_font_style_get_antialias (AdgFontStyle *font_style);
Gets the antialias mode used.
|
|
an AdgFontStyle object |
|
Returns : |
the requested antialias mode |
void adg_font_style_set_subpixel_order (AdgFontStyle *font_style, cairo_subpixel_order_t subpixel_order);
Sets a new subpixel order mode.
|
|
an AdgFontStyle object |
|
|
the new subpixel order mode |
cairo_subpixel_order_t adg_font_style_get_subpixel_order
(AdgFontStyle *font_style);
Gets the subpixel order mode used, that is the order of color elements within each pixel on the display device when rendering with an antialiasing mode of CAIRO_ANTIALIAS_SUBPIXEL.
|
|
an AdgFontStyle object |
|
Returns : |
the requested subpixel order mode |
void adg_font_style_set_hint_style (AdgFontStyle *font_style, cairo_hint_style_t hint_style);
Sets a new hint style mode.
|
|
an AdgFontStyle object |
|
|
the new hint style mode |
cairo_hint_style_t adg_font_style_get_hint_style (AdgFontStyle *font_style);
Gets the hint style mode used, that is how to fit outlines to the pixel grid in order to improve the appearance of the result.
|
|
an AdgFontStyle object |
|
Returns : |
the requested hint style mode |
void adg_font_style_set_hint_metrics (AdgFontStyle *font_style, cairo_hint_metrics_t hint_metrics);
Sets a new hint metrics state.
|
|
an AdgFontStyle object |
|
|
the new hint metrics state |
cairo_hint_metrics_t adg_font_style_get_hint_metrics (AdgFontStyle *font_style);
Gets the state on whether to hint font metrics.
|
|
an AdgFontStyle object |
|
Returns : |
the requested hint metrics state |
"antialias" property"antialias" gint : Read / Write
Type of antialiasing to do when rendering text.
Default value: 0
"color-dress" property"color-dress" AdgDress : Read / Write
The color dress to bind to this font style.
Allowed values: [G_MAXINT,G_MININT]
Default value: 0
"family" property"family" gchar* : Read / Write
The font family name, encoded in UTF-8.
Default value: NULL
"hint-metrics" property"hint-metrics" gint : Read / Write
Whether to hint font metrics, that is align them to integer values in device space.
Default value: 0
"hint-style" property"hint-style" gint : Read / Write
How outlines must fit to the pixel grid in order to improve the glyph appearance.
Default value: 0
"size" property"size" gdouble : Read / Write
Font size in user space units.
Allowed values: >= 0
Default value: 10
"slant" property"slant" gint : Read / Write
Variant of a font face based on its slant.
Default value: 0
"subpixel-order" property"subpixel-order" gint : Read / Write
The order of color elements within each pixel on the display device when rendering with subpixel antialiasing mode.
Default value: 0
AdgFontStylewas last modified by gtk-doc on Sun 21 Feb 2010 10:22:16 PM CET