Evas textblock: Added a temp fix for repch until implemented nicely.

This fix is just until we finally split to scripts and cache fi all
the time, i.e in all the possible paths (regular, fribidi and harfbuzz).

SVN revision: 58806
This commit is contained in:
Tom Hacohen 2011-04-21 15:34:44 +00:00
parent 2dce8da128
commit 902d94afb9
3 changed files with 18 additions and 5 deletions

View File

@ -2735,6 +2735,7 @@ _layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Text
const Eina_Unicode *tbase;
Evas_Object_Textblock_Text_Item *ti;
size_t cur_len = 0;
Eina_Unicode urepch = 0;
/* prepare a working copy of the string, either filled by the repch or
* filled with the true values */
@ -2771,7 +2772,6 @@ _layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Text
{
int i, ind;
Eina_Unicode *ptr;
Eina_Unicode urepch;
tbase = str = ptr = alloca((off + 1) * sizeof(Eina_Unicode));
ind = 0;
@ -2824,6 +2824,7 @@ skip:
c->par->bidi_props, ti->parent.text_pos, tmp_len);
}
}
ti->text_props.repch = urepch;
str += tmp_len;
cur_len -= tmp_len;

View File

@ -551,8 +551,12 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
#else
/* FIXME: Should be removed once we split according to script without
* the use of harfbuzz */
index =
evas_common_font_glyph_search(fn, &fi, text[EVAS_FONT_WALK_POS]);
if (text_props->repch)
index =
evas_common_font_glyph_search(fn, &fi, text_props->repch);
else
index =
evas_common_font_glyph_search(fn, &fi, text[EVAS_FONT_WALK_POS]);
if (index == 0)
{
@ -877,8 +881,12 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Eina_Unicode *in_text, con
#else
/* FIXME: Should be removed once we split according to script without
* the use of harfbuzz */
index =
evas_common_font_glyph_search(fn, &fi, text[EVAS_FONT_WALK_POS]);
if (text_props->repch)
index =
evas_common_font_glyph_search(fn, &fi, text_props->repch);
else
index =
evas_common_font_glyph_search(fn, &fi, text[EVAS_FONT_WALK_POS]);
if (fi->src->current_size != fi->size)
{

View File

@ -23,6 +23,10 @@ struct _Evas_Text_Props
Evas_BiDi_Props bidi;
Evas_Script_Type script;
Evas_Text_Props_Info *info;
/* FIXME: just a hack in the meanwhile, remove when I can finally cache
* fi and split to scripts without harfbuzz */
Eina_Unicode repch;
};
struct _Evas_Text_Props_Info