|
|
|
|
adg-1 reference manual |
|
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
struct AdgFontStyle; struct AdgFontStyleClass;cairo_antialias_t adg_font_style_get_antialias (AdgFontStyle *font_style); AdgDress adg_font_style_get_color_dress (AdgFontStyle *font_style); constgchar * adg_font_style_get_family (AdgFontStyle *font_style);cairo_hint_metrics_t adg_font_style_get_hint_metrics (AdgFontStyle *font_style);cairo_hint_style_t adg_font_style_get_hint_style (AdgFontStyle *font_style);cairo_scaled_font_t * adg_font_style_get_scaled_font (AdgFontStyle *font_style,const AdgMatrix *ctm);gdouble adg_font_style_get_size (AdgFontStyle *font_style);cairo_font_slant_t adg_font_style_get_slant (AdgFontStyle *font_style);cairo_subpixel_order_t adg_font_style_get_subpixel_order (AdgFontStyle *font_style);cairo_font_weight_t adg_font_style_get_weight (AdgFontStyle *font_style); AdgFontStyle * adg_font_style_new (void);cairo_font_options_t * adg_font_style_new_options (AdgFontStyle *font_style);void adg_font_style_set_antialias (AdgFontStyle *font_style,);cairo_antialias_t antialiasvoid adg_font_style_set_color_dress (AdgFontStyle *font_style,AdgDress dress);void adg_font_style_set_family (AdgFontStyle *font_style,const);gchar *familyvoid adg_font_style_set_hint_metrics (AdgFontStyle *font_style,);cairo_hint_metrics_t hint_metricsvoid adg_font_style_set_hint_style (AdgFontStyle *font_style,);cairo_hint_style_t hint_stylevoid adg_font_style_set_size (AdgFontStyle *font_style,);gdouble sizevoid adg_font_style_set_slant (AdgFontStyle *font_style,);cairo_font_slant_t slantvoid adg_font_style_set_subpixel_order (AdgFontStyle *font_style,);cairo_subpixel_order_t subpixel_ordervoid adg_font_style_set_weight (AdgFontStyle *font_style,);cairo_font_weight_t weight
"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.
struct AdgFontStyle;
All fields are private and should not be used directly. Use its public methods instead.
Since 1.0
cairo_antialias_t adg_font_style_get_antialias (AdgFontStyle *font_style);
Gets the antialias mode used.
|
|
an AdgFontStyle object |
|
Returns : |
the requested antialias mode. [type gint][transfer none] |
Since 1.0
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. [transfer none] |
Since 1.0
constgchar * 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. [transfer none] |
Since 1.0
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. [type gint][transfer none] |
Since 1.0
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. [type gint][transfer none] |
Since 1.0
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. [transfer none] |
Since 1.0
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. |
Since 1.0
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. [type gint][transfer none] |
Since 1.0
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. [type gint][transfer none] |
Since 1.0
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. [type gint][transfer none] |
Since 1.0
AdgFontStyle * adg_font_style_new (void);
Constructs a new font style initialized with default params.
|
Returns : |
a newly created font style. [transfer full] |
Since 1.0
cairo_font_options_t * adg_font_style_new_options (AdgFontStyle *font_style);
Creates a new set of font_style. The returned value must be freed with
cairo_font_options_destroy()
|
|
an AdgFontStyle object |
|
Returns : |
a newly allocated list of cairo font options. [transfer full] |
Since 1.0
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. [type gint] |
Since 1.0
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. [transfer none] |
Since 1.0
void adg_font_style_set_family (AdgFontStyle *font_style,const);gchar *family
Sets a new family.
|
|
an AdgFontStyle object |
|
|
the new family. [transfer none] |
Since 1.0
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. [type gint] |
Since 1.0
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. [type gint] |
Since 1.0
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 |
Since 1.0
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. [type gint] |
Since 1.0
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. [type gint] |
Since 1.0
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. [type gint] |
Since 1.0
"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 fallback color dress to bind to this 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