diff --git a/efl/evas/efl.evas.pyx b/efl/evas/efl.evas.pyx index 5bf3807..7be48df 100644 --- a/efl/evas/efl.evas.pyx +++ b/efl/evas/efl.evas.pyx @@ -276,6 +276,50 @@ def color_rgb_to_hsv(int r, int g, int b): evas_color_rgb_to_hsv(r, g, b, &h, &s, &v) return (h, s, v) +def font_path_global_clear(): + """Removes all font paths loaded + + .. versionadded: 1.10 + + """ + evas_font_path_global_clear() + +def font_path_global_append(path): + """Appends a font path to the list of font paths used by the application + + .. versionadded: 1.10 + + """ + if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path) + evas_font_path_global_append( + path if path is not None else NULL) + +def font_path_global_prepend(path): + """Prepends a font path to the list of font paths used by the application + + .. versionadded: 1.10 + + """ + if isinstance(path, unicode): path = PyUnicode_AsUTF8String(path) + evas_font_path_global_prepend( + path if path is not None else NULL) + +def font_path_global_list(): + """Retrieves the list of font paths used by the application + + .. versionadded: 1.10 + + """ + cdef Eina_List *lst = evas_font_path_global_list() + + ret = [] + while lst != NULL: + ret.append( lst.data) + lst = lst.next + + return ret + + class EvasLoadError(Exception): def __init__(self, int code, filename, key): diff --git a/include/efl.evas.pxd b/include/efl.evas.pxd index f9db0a6..f71db5b 100644 --- a/include/efl.evas.pxd +++ b/include/efl.evas.pxd @@ -275,6 +275,11 @@ cdef extern from "Evas.h": int evas_init() int evas_shutdown() + void evas_font_path_global_clear() + void evas_font_path_global_append(const char *path) + void evas_font_path_global_prepend(const char *path) + const Eina_List * evas_font_path_global_list() + #################################################################### # Canvas