ezfc_alias_t

ezfc_alias_t — A class for managing the alias font name.

Functions

Types and Values

Description

This class provides an easy access to the alias font name and the font that actually being assigned to it.

Functions

ezfc_alias_new ()

ezfc_alias_t *
ezfc_alias_new (const gchar *alias_name);

Create an instance of ezfc_alias_t.

Parameters

alias_name

the alias font name like sans-serif, serif and monospace. This can be the usual font name. in this case, the font added by ezfc_alias_set_font() behaves as the substitution font of it.

 

Returns

a ezfc_alias_t.


ezfc_alias_ref ()

ezfc_alias_t *
ezfc_alias_ref (ezfc_alias_t *alias);

Increases the reference count of alias .

Parameters

alias

a ezfc_alias_t.

 

Returns

the same alias .

[transfer none]


ezfc_alias_unref ()

void
ezfc_alias_unref (ezfc_alias_t *alias);

Decreases the reference count of alias . When its reference count drops to 0, the object is finalized (i.e. its memory is freed).

Parameters

alias

a ezfc_alias_t.

 

ezfc_alias_get_name ()

const gchar *
ezfc_alias_get_name (ezfc_alias_t *alias);

Obtains the alias font name in alias object.

Parameters

alias

a ezfc_alias_t.

 

Returns

the alias font name.


ezfc_alias_get_font_pattern ()

FcPattern *
ezfc_alias_get_font_pattern (ezfc_alias_t *alias);

Obtains FcPattern in ezfc_alias_t.

Parameters

alias

a ezfc_alias_t.

 

Returns

a duplicate of FcPattern in the instance. it has to be freed. NULL if alias doesn't have any font pattern.


ezfc_alias_set_font_pattern ()

gboolean
ezfc_alias_set_font_pattern (ezfc_alias_t *alias,
                             const FcPattern *pattern,
                             GError **error);

Set pattern as the font pattern. alias keeps a duplicate instance of pattern .

Parameters

alias

a ezfc_alias_t.

 

pattern

a FcPattern.

 

error

a GError.

[allow-none]

Returns

TRUE if it successfully is set. otherwise FALSE.


ezfc_alias_get_font ()

const gchar *
ezfc_alias_get_font (ezfc_alias_t *alias);

Obtains the font that is set as the alias font for alias .

Parameters

alias

a ezfc_alias_t.

 

Returns

the font name.


ezfc_alias_set_font ()

gboolean
ezfc_alias_set_font (ezfc_alias_t *alias,
                     const gchar *font_name,
                     GError **error);

Set font_name as the font family name used for the alias font.

Parameters

alias

a ezfc_alias_t.

 

font_name

a font name.

 

error

a GError.

[allow-none]

Returns

TRUE if it successfully is set. otherwise FALSE.


ezfc_alias_check_font_existence ()

void
ezfc_alias_check_font_existence (ezfc_alias_t *alias,
                                 gboolean flag);

Set a flag whether checking the font existence when invoking ezfc_alias_set_font().

Parameters

alias

a ezfc_alias_t.

 

flag

a boolean value.

 

Types and Values

ezfc_alias_t

typedef struct _ezfc_alias_t ezfc_alias_t;

All the fields in the ezfc_alias_t structure are private to the ezfc_alias_t implementation.