Tizen Native API

These are functions dealing with font rendering, selection, and the like for Elementary applications. One might fetch which system fonts are there to use and set custom fonts for individual classes of UI items containing text (text classes).

Functions

Elm_Font_Propertieselm_font_properties_get (const char *font)
 Translates a font (family) name string in the fontconfig's font names syntax into an Elm_Font_Properties struct.
void elm_font_properties_free (Elm_Font_Properties *efp)
 Frees the font properties returned by elm_font_properties_get().
char * elm_font_fontconfig_name_get (const char *name, const char *style)
 Translates a font name, bound to a style, into the fontconfig's font names syntax.
void elm_font_fontconfig_name_free (char *name)
 Frees the font string returned by elm_font_fontconfig_name_get().
Eina_Hashelm_font_available_hash_add (Eina_List *list)
 Creates a font hash table of available system fonts.
void elm_font_available_hash_del (Eina_Hash *hash)
 Frees the hash returned by elm_font_available_hash_add().

Typedefs

typedef struct _Elm_Font_Overlay Elm_Font_Overlay
 Structure of Elm Font Overlay.
typedef struct _Elm_Font_Properties Elm_Font_Properties
 Structure of Elm Font Property.

Function Documentation

Applies the changes made with elm_config_font_overlay_set() and elm_config_font_overlay_unset() on the current Elementary window.

Since :
2.3.1

This applies all font overlays set to all objects in the UI.

Gets Elementary's list of font overlays, set using elm_config_font_overlay_set().

Since :
2.3.1
Remarks:
For each text class, one can set a font overlay, overriding the default font properties for that class coming from the theme in use. There is no need to free this list.
Returns:
The font overlays list with Elm_Font_Overlay blobs as data
See also:
elm_config_font_overlay_set()
elm_config_font_overlay_unset()
void elm_config_font_overlay_set ( const char *  text_class,
const char *  font,
Evas_Font_Size  size 
)

Sets a font overlay for a given Elementary text class.

Since :
2.3.1
Remarks:
font has to be in the format returned by elm_font_fontconfig_name_get().
Parameters:
[in]text_classThe text class name
[in]fontThe font name and style string
[in]sizeThe font size
See also:
elm_config_font_overlay_list_get()
elm_config_font_overlay_unset()
edje_object_text_class_set()
void elm_config_font_overlay_unset ( const char *  text_class)

Unsets a font overlay for a given Elementary text class.

Since :
2.3.1
Remarks:
This brings back text elements belonging to the text class text_class back to their default font settings.
Parameters:
[in]text_classThe text class name

Frees Elementary's list of supported text classes.

Parameters:
[in]listThe text classes list to be freed.
Since :
2.3.1
See also:
elm_config_text_classes_list_get().

Gets Elementary's list of supported text classes.

Since :
2.3.1
Remarks:
Release the list with elm_text_classes_list_free().
Returns:
The text classes list with Elm_Text_Class blobs as data

Creates a font hash table of available system fonts.

Since :
2.3.1
Remarks:
The hash is indexed by font(family) names that are its values Elm_Font_Properties blobs.
The user is supposed to get it populated at least with 3 default font families (Sans, Serif, Monospace), which should be present on most systems.
Parameters:
[in]listThe list of available system fonts.
Returns:
The font hash

Frees the hash returned by elm_font_available_hash_add().

Since :
2.3.1
Parameters:
[in]hashThe hash to be freed
void elm_font_fontconfig_name_free ( char *  name)

Frees the font string returned by elm_font_fontconfig_name_get().

Since :
2.3.1
Parameters:
[in]nameThe font properties struct
char* elm_font_fontconfig_name_get ( const char *  name,
const char *  style 
)

Translates a font name, bound to a style, into the fontconfig's font names syntax.

Since :
2.3.1
Remarks:
The reverse translation can be achieved with elm_font_properties_get(), for one style only (single font instance, not family).
Parameters:
[in]nameThe font (family) name
[in]styleThe given style (may be NULL)
Returns:
The font name and style string

Frees the font properties returned by elm_font_properties_get().

Since :
2.3.1
Parameters:
[in]efpThe font properties struct

Translates a font (family) name string in the fontconfig's font names syntax into an Elm_Font_Properties struct.

Since :
2.3.1
Remarks:
The reverse translation can be achieved with elm_font_fontconfig_name_get(), for one style only (single font instance, not family).
Parameters:
[in]fontThe font name and styles string
Returns:
The font properties struct