Utilities

Utilities — A collection of the utility functions

Synopsis

#include <libeasyfc/ezfc.h>

void                ezfc_init                           (void);
void                ezfc_finalize                       (void);
gboolean            ezfc_is_alias_font                  (const gchar *alias_name);
GList *             ezfc_get_fonts_list                 (const gchar *language,
                                                         const gchar *alias_name);
GList *             ezfc_get_fonts_pattern_list         (const gchar *language,
                                                         const gchar *alias_name);

Description

This collects some utility functions.

Details

ezfc_init ()

void                ezfc_init                           (void);

Initialize the library.


ezfc_finalize ()

void                ezfc_finalize                       (void);

Finalize the library.


ezfc_is_alias_font ()

gboolean            ezfc_is_alias_font                  (const gchar *alias_name);

Checks if alias_name is one of sans-serif, serif, monospace, cursive or fantasy.

alias_name :

the alias font name

Returns :

TRUE if alias_name is an alias font name, otherwise FALSE.

ezfc_get_fonts_list ()

GList *             ezfc_get_fonts_list                 (const gchar *language,
                                                         const gchar *alias_name);

Obtains the fonts list being assigned to alias_name for language.

language :

the language name fontconfig can deal with. [allow-none]

alias_name :

the alias name to obtain the fonts list for. [allow-none]

Returns :

a GList contains the font family name. if no valid families, NULL then. [element-type utf8][transfer full]

ezfc_get_fonts_pattern_list ()

GList *             ezfc_get_fonts_pattern_list         (const gchar *language,
                                                         const gchar *alias_name);

Obtains FcPattern list being assigned to alias_name for language.

language :

the language name fontconfig can deal with. [allow-none]

alias_name :

the alias name to obtain the fonts pettern list for. [allow-none]

Returns :

a GList contains FcPattern, otherwise NULL.