{
ENFN->font_text_props_info_create(ENDT,
fi, str + pos, &it->text_props,
- o->bidi_par_props, it->text_pos, len, EVAS_TEXT_PROPS_MODE_SHAPE);
+ o->bidi_par_props, it->text_pos, len, EVAS_TEXT_PROPS_MODE_SHAPE,
+ o->cur.fdesc->lang);
_evas_object_text_item_update_sizes(obj, o, it);
}
o->items = (Evas_Object_Text_Item *)
{
ENFN->font_text_props_info_create(ENDT,
cur_fi, str, &ti->text_props, c->par->bidi_props,
- ti->parent.text_pos, run_len, EVAS_TEXT_PROPS_MODE_SHAPE);
+ ti->parent.text_pos, run_len, EVAS_TEXT_PROPS_MODE_SHAPE,
+ ti->parent.format->font.fdesc->lang);
}
while ((queue->start + queue->off) < (run_start + run_len))
ENFN->font_text_props_info_create(ENDT,
cur_fi, _ellip_str, &ellip_ti->text_props,
- c->par->bidi_props, ellip_ti->parent.text_pos, len, EVAS_TEXT_PROPS_MODE_SHAPE);
+ c->par->bidi_props, ellip_ti->parent.text_pos, len, EVAS_TEXT_PROPS_MODE_SHAPE,
+ ellip_ti->parent.format->font.fdesc->lang);
}
_text_item_update_sizes(c, ellip_ti);
ENFN->font_text_props_info_create(ENDT,
cur_fi, _hyphen_str, &hyphen_ti->text_props,
- c->par->bidi_props, hyphen_ti->parent.text_pos, len, EVAS_TEXT_PROPS_MODE_SHAPE);
+ c->par->bidi_props, hyphen_ti->parent.text_pos, len, EVAS_TEXT_PROPS_MODE_SHAPE,
+ hyphen_ti->parent.format->font.fdesc->lang);
}
_text_item_update_sizes(c, hyphen_ti);
evas_common_text_props_script_set(&(glyph->props[idx]), script);
ENFN->font_text_props_info_create(ENDT, script_fi, &codepoint,
&(glyph->props[idx]), NULL, 0, 1,
- EVAS_TEXT_PROPS_MODE_NONE);
+ EVAS_TEXT_PROPS_MODE_NONE,
+ o->cur.font_description->lang);
(*used)++;
}
else
evas_common_text_props_script_set(&text_props, script);
ENFN->font_text_props_info_create(ENDT, script_fi, W, &text_props,
NULL, 0, 1,
- EVAS_TEXT_PROPS_MODE_NONE);
+ EVAS_TEXT_PROPS_MODE_NONE,
+ o->cur.font_description->lang);
advance = ENFN->font_h_advance_get(ENDT, o->font, &text_props);
vadvance = ENFN->font_v_advance_get(ENDT, o->font, &text_props);
o->cur.char_width = advance;
EAPI Eina_Bool
evas_common_font_ot_populate_text_props(const Eina_Unicode *text,
- Evas_Text_Props *props, int len, Evas_Text_Props_Mode mode)
+ Evas_Text_Props *props, int len, Evas_Text_Props_Mode mode, const char *lang)
{
RGBA_Font_Int *fi;
hb_buffer_t *buffer;
buffer = hb_buffer_create();
hb_buffer_set_unicode_funcs(buffer, _evas_common_font_ot_unicode_funcs_get());
- hb_buffer_set_language(buffer, hb_language_from_string(
- evas_common_language_from_locale_get(), -1));
+ hb_buffer_set_language(buffer, hb_language_from_string(lang, -1));
hb_buffer_set_script(buffer, _evas_script_to_harfbuzz[props->script]);
hb_buffer_set_direction(buffer,
(props->bidi_dir == EVAS_BIDI_DIRECTION_RTL) ?
EAPI Eina_Bool
evas_common_font_ot_populate_text_props(const Eina_Unicode *text,
- Evas_Text_Props *props, int len, Evas_Text_Props_Mode mode);
+ Evas_Text_Props *props, int len, Evas_Text_Props_Mode mode, const char *lang);
#endif
#ifdef OT_SUPPORT
static inline void
_content_create_ot(RGBA_Font_Int *fi, const Eina_Unicode *text,
- Evas_Text_Props *text_props, int len, Evas_Text_Props_Mode mode)
+ Evas_Text_Props *text_props, int len, Evas_Text_Props_Mode mode, const char *lang)
{
size_t char_index;
Evas_Font_Glyph_Info *gl_itr;
Evas_Coord pen_x = 0, adjust_x = 0;
- evas_common_font_ot_populate_text_props(text, text_props, len, mode);
+ evas_common_font_ot_populate_text_props(text, text_props, len, mode, lang);
gl_itr = text_props->info->glyph;
for (char_index = 0 ; char_index < text_props->len ; char_index++)
EAPI Eina_Bool
evas_common_text_props_content_create(void *_fi, const Eina_Unicode *text,
Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props,
- size_t par_pos, int len, Evas_Text_Props_Mode mode)
+ size_t par_pos, int len, Evas_Text_Props_Mode mode, const char *lang)
{
RGBA_Font_Int *fi = (RGBA_Font_Int *) _fi;
#ifdef OT_SUPPORT
(void) par_props;
(void) par_pos;
- _content_create_ot(fi, text, text_props, len, mode);
+ _content_create_ot(fi, text, text_props, len, mode, lang);
#else
+ (void) lang;
_content_create_regular(fi, text, text_props, par_props, par_pos, len, mode);
#endif
EAPI Eina_Bool
evas_common_text_props_content_create(void *_fi, const Eina_Unicode *text,
Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props,
- size_t par_pos, int len, Evas_Text_Props_Mode mode);
+ size_t par_pos, int len, Evas_Text_Props_Mode mode, const char *lang);
void
evas_common_text_props_content_copy_and_ref(Evas_Text_Props *dst,
void (*image_content_hint_set) (void *data, void *surface, int hint);
int (*image_content_hint_get) (void *data, void *surface);
int (*font_pen_coords_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch);
- Eina_Bool (*font_text_props_info_create) (void *data, Evas_Font_Instance *fi, const Eina_Unicode *text, Evas_Text_Props *intl_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len, Evas_Text_Props_Mode mode);
+ Eina_Bool (*font_text_props_info_create) (void *data, Evas_Font_Instance *fi, const Eina_Unicode *text, Evas_Text_Props *intl_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len, Evas_Text_Props_Mode mode, const char *lang);
int (*font_right_inset_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props);
/* EFL-GL Glue Layer */
}
static Eina_Bool
-eng_font_text_props_info_create(void *data EINA_UNUSED, Evas_Font_Instance *fi, const Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t par_pos, size_t len, Evas_Text_Props_Mode mode)
+eng_font_text_props_info_create(void *data EINA_UNUSED, Evas_Font_Instance *fi, const Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t par_pos, size_t len, Evas_Text_Props_Mode mode, const char *lang)
{
return evas_common_text_props_content_create((RGBA_Font_Int *) fi, text,
- text_props, par_props, par_pos, len, mode);
+ text_props, par_props, par_pos, len, mode, lang);
}
static int