eina_unicode_strncpy(it->text, str + pos, len);
evas_common_text_props_bidi_set(&it->text_props, o->bidi_par_props,
it->text_pos);
- evas_common_text_props_script_set(&it->text_props, it->text);
+ evas_common_text_props_script_set(&it->text_props, it->text, len);
if (o->engine_data)
{
ENFN->font_text_props_info_create(ENDT,
evas_common_text_props_bidi_set(&ti->text_props,
ti->parent.text_node->bidi_props, ti->parent.text_pos);
evas_common_text_props_script_set (&ti->text_props,
- ti->text);
+ ti->text, tmp_len);
if (ti->parent.format->font.font)
{
c->ENFN->font_text_props_info_create(c->ENDT,
evas_common_text_props_bidi_set(&ellip_ti->text_props,
ellip_ti->parent.text_node->bidi_props, ellip_ti->parent.text_pos);
evas_common_text_props_script_set (&ellip_ti->text_props,
- ellip_ti->text);
+ ellip_ti->text, len);
c->ENFN->font_text_props_info_create(c->ENDT,
ellip_ti->parent.format->font.font,
ellip_ti->text, &ellip_ti->text_props,
void
evas_common_text_props_script_set(Evas_Text_Props *props,
- const Eina_Unicode *str)
+ const Eina_Unicode *str, size_t len)
{
- props->script = evas_common_language_script_type_get(str);
+ props->script = evas_common_language_script_type_get(str, len);
}
void
void
evas_common_text_props_script_set(Evas_Text_Props *props,
- const Eina_Unicode *str);
+ const Eina_Unicode *str, size_t len);
EAPI Eina_Bool
evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
}
Evas_Script_Type
-evas_common_language_script_type_get(const Eina_Unicode *str)
+evas_common_language_script_type_get(const Eina_Unicode *str, size_t len)
{
Evas_Script_Type script = EVAS_SCRIPT_COMMON;
+ const Eina_Unicode *end = str + len;
/* Arabic is the first script in the array that's not a common/inherited */
- for ( ; *str && ((script = evas_common_language_char_script_get(*str)) < EVAS_SCRIPT_ARABIC) ; str++)
+ for ( ; str < end && ((script = evas_common_language_char_script_get(*str)) < EVAS_SCRIPT_ARABIC) ; str++)
;
return script;
}
evas_common_language_script_end_of_run_get(const Eina_Unicode *str, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len);
Evas_Script_Type
-evas_common_language_script_type_get(const Eina_Unicode *str);
+evas_common_language_script_type_get(const Eina_Unicode *str, size_t len);
Evas_Script_Type
evas_common_language_char_script_get(Eina_Unicode unicode);