| Guifications Library Reference Manual |
|---|
GfFontGfFont — GfFont Object API |
GfFont;
enum GfFontMask;
enum GfFontStretch;
enum GfFontStyle;
enum GfFontVariant;
enum GfFontWeight;
GfFont* gf_font_new ();
GfFont* gf_font_copy (const GfFont *font);
void gf_font_free (GfFont *font);
void gf_font_set_family (GfFont *font,
const gchar *family);
const gchar* gf_font_get_family (const GfFont *font);
void gf_font_set_style (GfFont *font,
GfFontStyle style);
GfFontStyle gf_font_get_style (const GfFont *font);
void gf_font_set_variant (GfFont *font,
GfFontVariant variant);
GfFontVariant gf_font_get_variant (const GfFont *font);
void gf_font_set_weight (GfFont *font,
GfFontWeight weight);
GfFontWeight gf_font_get_weight (const GfFont *font);
void gf_font_set_stretch (GfFont *font,
GfFontStretch stretch);
GfFontStretch gf_font_get_stretch (const GfFont *font);
void gf_font_set_size (GfFont *font,
gint size);
gint gf_font_get_size (const GfFont *font);
void gf_font_set_absolute_size (GfFont *font,
double size);
gboolean gf_font_get_size_is_absolute (const GfFont *font);
void gf_font_set_mask (GfFont *font,
GfFontMask mask);
GfFontMask gf_font_get_mask (const GfFont *font);
gboolean gf_font_equal (const GfFont *f1,
const GfFont *f2);
#define gf_font_style_from_string (str)
#define gf_font_style_to_string (style, i18n)
#define gf_font_variant_from_string (str)
#define gf_font_variant_to_string (variant, i18n)
#define gf_font_weight_from_string (str)
#define gf_font_weight_to_string (weight, i18n)
#define gf_font_stretch_from_string (str)
#define gf_font_stretch_to_string (stretch, i18n)
#define gf_font_mask_from_string (str)
#define gf_font_mask_to_string (mask, i18n)
typedef struct _GfFont GfFont;
GfFont is an opaque structure that should not be used directly.
typedef enum _GfFontMask {
GF_FONT_MASK_FAMILY = 1 << 0,
GF_FONT_MASK_STYLE = 1 << 1,
GF_FONT_MASK_VARIANT = 1 << 2,
GF_FONT_MASK_WEIGHT = 1 << 3,
GF_FONT_MASK_STRETCH = 1 << 4,
GF_FONT_MASK_SIZE = 1 << 5
} GfFontMask;
Font mask values.
GF_FONT_MASK_FAMILY |
Family. |
GF_FONT_MASK_STYLE |
Style. |
GF_FONT_MASK_VARIANT |
Variant. |
GF_FONT_MASK_WEIGHT |
Weight. |
GF_FONT_MASK_STRETCH |
Stretch. |
GF_FONT_MASK_SIZE |
Size. |
typedef enum _GfFontStretch {
GF_FONT_STRETCH_ULTRA_CONDENSED,
GF_FONT_STRETCH_EXTRA_CONDENSED,
GF_FONT_STRETCH_CONDENSED,
GF_FONT_STRETCH_SEMI_CONDENSED,
GF_FONT_STRETCH_NORMAL,
GF_FONT_STRETCH_SEMI_EXPANDED,
GF_FONT_STRETCH_EXPANDED,
GF_FONT_STRETCH_EXTRA_EXPANDED,
GF_FONT_STRETCH_ULTRA_EXPANDED
} GfFontStretch;
Font stretch values.
GF_FONT_STRETCH_ULTRA_CONDENSED |
Ultra-Condensed. |
GF_FONT_STRETCH_EXTRA_CONDENSED |
Extra-Condensed. |
GF_FONT_STRETCH_CONDENSED |
Condensed. |
GF_FONT_STRETCH_SEMI_CONDENSED |
Semi-Condensed. |
GF_FONT_STRETCH_NORMAL |
Normal. |
GF_FONT_STRETCH_SEMI_EXPANDED |
Semi-Expanded. |
GF_FONT_STRETCH_EXPANDED |
Expanded. |
GF_FONT_STRETCH_EXTRA_EXPANDED |
Extra-Expanded. |
GF_FONT_STRETCH_ULTRA_EXPANDED |
Ultra-Expanded. |
typedef enum _GfFontStyle {
GF_FONT_STYLE_NORMAL,
GF_FONT_STYLE_OBLIQUE,
GF_FONT_STYLE_ITALIC
} GfFontStyle;
Font styles.
GF_FONT_STYLE_NORMAL |
Normal |
GF_FONT_STYLE_OBLIQUE |
Oblique |
GF_FONT_STYLE_ITALIC |
Italic |
typedef enum _GfFontVariant{
GF_FONT_VARIANT_NORMAL,
GF_FONT_VARIANT_SMALL_CAPS
} GfFontVariant;
Font variants.
GF_FONT_VARIANT_NORMAL |
Normal. |
GF_FONT_VARIANT_SMALL_CAPS |
Small caps. |
typedef enum _GfFontWeight {
GF_FONT_WEIGHT_ULTRA_LIGHT = 200,
GF_FONT_WEIGHT_LIGHT = 300,
GF_FONT_WEIGHT_NORMAL = 400,
GF_FONT_WEIGHT_SEMIBOLD = 600,
GF_FONT_WEIGHT_BOLD = 700,
GF_FONT_WEIGHT_ULTRABOLD = 800,
GF_FONT_WEIGHT_HEAVY = 900
} GfFontWeight;
Font weights.
GF_FONT_WEIGHT_ULTRA_LIGHT |
Ultra-Light |
GF_FONT_WEIGHT_LIGHT |
Light |
GF_FONT_WEIGHT_NORMAL |
Normal |
GF_FONT_WEIGHT_SEMIBOLD |
Semi-Bold |
GF_FONT_WEIGHT_BOLD |
Bold |
GF_FONT_WEIGHT_ULTRABOLD |
Ultra-Bold |
GF_FONT_WEIGHT_HEAVY |
Heavy |
GfFont* gf_font_new ();
Creates a new GfFont instance.
| Returns : | The new GfFont instance. |
GfFont* gf_font_copy (const GfFont *font);
Creates a copy of font.
font : |
The GfFont instance to copy. |
| Returns : | A copy of font.
|
void gf_font_set_family (GfFont *font, const gchar *family);
Sets the family of font to family.
font : |
The GfFont instance. |
family : |
The new family. |
const gchar* gf_font_get_family (const GfFont *font);
Gets the family of font.
font : |
The GfFont instance. |
| Returns : | The family of font.
|
void gf_font_set_style (GfFont *font, GfFontStyle style);
Sets the style of font to style.
font : |
The GfFont instance. |
style : |
The new style. |
GfFontStyle gf_font_get_style (const GfFont *font);
Gets the style of font.
font : |
The GfFont instance. |
| Returns : | The style of font.
|
void gf_font_set_variant (GfFont *font, GfFontVariant variant);
Sets the variant of font to variant.
font : |
The GfFont instance. |
variant : |
The new variant. |
GfFontVariant gf_font_get_variant (const GfFont *font);
Gets the variant of font.
font : |
The GfFont instance. |
| Returns : | The variant of font.
|
void gf_font_set_weight (GfFont *font, GfFontWeight weight);
Sets the weight of font to weight.
font : |
The GfFont instance. |
weight : |
The new weight. |
GfFontWeight gf_font_get_weight (const GfFont *font);
Gets the weight of font.
font : |
The GfFont instance. |
| Returns : | The weight of font.
|
void gf_font_set_stretch (GfFont *font, GfFontStretch stretch);
Sets the stretch of font to stretch.
font : |
The GfFont instance. |
stretch : |
The new stretch. |
GfFontStretch gf_font_get_stretch (const GfFont *font);
Gets the stretch of font.
font : |
The GfFont instance. |
| Returns : | The stretch of font.
|
void gf_font_set_size (GfFont *font, gint size);
Sets the size of font to size.
font : |
The GfFont instance. |
size : |
The new size. |
gint gf_font_get_size (const GfFont *font);
Gets the size of font.
font : |
The GfFont instance. |
| Returns : | The size of font.
|
void gf_font_set_absolute_size (GfFont *font, double size);
Sets the absolute size of font to size.
font : |
The GfFont instance. |
size : |
THe new absolute size. |
gboolean gf_font_get_size_is_absolute (const GfFont *font);
Gets whether or not font has an absolute size.
font : |
The GfFont instance. |
| Returns : | TRUE if font has an absolute size.
|
void gf_font_set_mask (GfFont *font, GfFontMask mask);
Sets the GfFontMask for font to mask.
font : |
The GfFont instance. |
mask : |
The new mask. |
GfFontMask gf_font_get_mask (const GfFont *font);
Gets the GfFontMask for font.
font : |
The GfFont instance. |
| Returns : | The GfFontMask of font.
|
gboolean gf_font_equal (const GfFont *f1, const GfFont *f2);
Checks whether two GfFont's are equal.
#define gf_font_style_from_string(str)
Gets a GfFontStyle from a string.
Note: str MUST be the untranslated string!
str : |
The string. |
| Returns : | The GfFontStyle. |
#define gf_font_style_to_string(style, i18n)
Gets a string from a GfFontStyle
style : |
The GfFontStyle. |
i18n : |
TRUE to get the translated string. |
| Returns : |
style as a string.
|
#define gf_font_variant_from_string(str)
Gets a GfFontVariant from a string.
Note: str MUST be the untranslated string!
str : |
The string. |
| Returns : | The GfFontVariant. |
#define gf_font_variant_to_string(variant, i18n)
Gets a string from a GfFontVariant.
variant : |
The GfFontVariant. |
i18n : |
TRUE for the translated string. |
| Returns : |
variant as a string.
|
#define gf_font_weight_from_string(str)
Gets a GfFontWeight from a string.
Note: str MUST be the untranslated string!
str : |
The string. |
| Returns : | The GfFontWeight. |
#define gf_font_weight_to_string(weight, i18n)
Gets a string from a GfFontWeight.
weight : |
The GfFontWeight. |
i18n : |
TRUE for the translated version. |
| Returns : |
weight as a string.
|
#define gf_font_stretch_from_string(str)
Gets a GfFontStretch from a string.
Note: str MUST be the untranslated string!
str : |
The string. |
| Returns : | The GfFontStretch. |
#define gf_font_stretch_to_string(stretch, i18n)
Gets a string from a GfFontStretch.
stretch : |
The GfFontStretch. |
i18n : |
TRUE for the translated version. |
| Returns : |
stretch as a string.
|
#define gf_font_mask_from_string(str)
Gets a GfFontMask from a string.
Note: str MUST be the untranslated string!
str : |
The string. |
| Returns : | The GfFontMask. |
#define gf_font_mask_to_string(mask, i18n)
Gets a string from a GfFontMask.
mask : |
The GfFontMask. |
i18n : |
TRUE for the translated version. |
| Returns : |
mask as a string.
|
| << Primitives | Plugins >> |