1 #ifndef _EVAS_TEXT_UTILS_H
2 # define _EVAS_TEXT_UTILS_H
4 typedef struct _Evas_Text_Props Evas_Text_Props;
5 typedef struct _Evas_Text_Props_Info Evas_Text_Props_Info;
6 typedef struct _Evas_Font_Glyph_Info Evas_Font_Glyph_Info;
8 # include "evas_font_ot.h"
9 # include "language/evas_bidi_utils.h"
10 # include "language/evas_language_utils.h"
12 struct _Evas_Text_Props
14 /* Start and len represent the start offset and the length in the
15 * glyphs_info and ot_data fields, they are both internal */
18 size_t text_offset; /* The text offset from the start of the info */
19 size_t text_len; /* The length of the original text */
21 Evas_Script_Type script;
22 Evas_Text_Props_Info *info;
25 struct _Evas_Text_Props_Info
27 unsigned int refcount;
28 Evas_Font_Glyph_Info *glyph;
29 Evas_Font_OT_Info *ot;
32 /* Sorted in visual order when created */
33 struct _Evas_Font_Glyph_Info
35 unsigned int index; /* Should conform to FT */
38 /* This one is rarely used, only in draw, in which we already get the glyph
39 * so it doesn't really save time. Leaving it here just so no one will
40 * add it thinking it was accidentally skipped */
49 evas_common_text_props_bidi_set(Evas_Text_Props *props,
50 Evas_BiDi_Paragraph_Props *bidi_par_props, size_t start);
53 evas_common_text_props_script_set(Evas_Text_Props *props,
54 const Eina_Unicode *str);
57 evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
58 Evas_Text_Props *text_props, int len);
61 evas_common_text_props_content_copy_and_ref(Evas_Text_Props *dst,
62 const Evas_Text_Props *src);
65 evas_common_text_props_content_ref(Evas_Text_Props *props);
68 evas_common_text_props_content_unref(Evas_Text_Props *props);
72 evas_common_text_props_split(Evas_Text_Props *base, Evas_Text_Props *ext,
75 evas_common_text_props_merge(Evas_Text_Props *item1, const Evas_Text_Props *item2);