From fccfbf78b0cb17c20ae77974f2dbcc9a4710f86b Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 18 May 2011 11:18:00 +0000 Subject: [PATCH] Evas font-engine: Don't search fi again in ot populate. We already calculate it in content create. SVN revision: 59498 --- .../src/lib/engines/common/evas_font_ot.c | 27 +++---------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/legacy/evas/src/lib/engines/common/evas_font_ot.c b/legacy/evas/src/lib/engines/common/evas_font_ot.c index edeb6cdd74..5a1f2d9000 100644 --- a/legacy/evas/src/lib/engines/common/evas_font_ot.c +++ b/legacy/evas/src/lib/engines/common/evas_font_ot.c @@ -262,10 +262,9 @@ _evas_common_font_ot_shape(hb_buffer_t *buffer, RGBA_Font_Int *fi) } EAPI Eina_Bool -evas_common_font_ot_populate_text_props(void *_fn, const Eina_Unicode *text, - Evas_Text_Props *props, int len) +evas_common_font_ot_populate_text_props(void *_fn __UNUSED__, + const Eina_Unicode *text, Evas_Text_Props *props, int len) { - RGBA_Font *fn = (RGBA_Font *) _fn; RGBA_Font_Int *fi; hb_buffer_t *buffer; hb_glyph_position_t *positions; @@ -276,27 +275,7 @@ evas_common_font_ot_populate_text_props(void *_fn, const Eina_Unicode *text, Evas_Font_OT_Info *ot_itr; Evas_Coord pen_x = 0; - fi = fn->fonts->data; - /* Load the font needed for this script */ - { - /* Skip common chars */ - const Eina_Unicode *tmp; - for (tmp = text ; - *tmp && - evas_common_language_char_script_get(*tmp) == EVAS_SCRIPT_COMMON ; - tmp++) - ; - if (!*tmp && (tmp > text)) tmp--; - evas_common_font_glyph_search(fn, &fi, *tmp); - } - evas_common_font_int_reload(fi); - if (fi->src->current_size != fi->size) - { - FTLOCK(); - FT_Activate_Size(fi->ft.size); - FTUNLOCK(); - fi->src->current_size = fi->size; - } + fi = props->font_instance; if (len < 0) {