diff options
author | Tom Hacohen <tom@stosb.com> | 2011-04-21 15:34:44 +0000 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2011-04-21 15:34:44 +0000 |
commit | 902d94afb9497d03e9b6631e15b4aa009b8a8e10 (patch) | |
tree | c95051842b45c3b142fc86fb720593ad0fa9db9f /legacy/evas | |
parent | 2dce8da128b261977d5b0533312473185acf46b5 (diff) |
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
Diffstat (limited to '')
-rw-r--r-- | legacy/evas/src/lib/canvas/evas_object_textblock.c | 3 | ||||
-rw-r--r-- | legacy/evas/src/lib/engines/common/evas_font_draw.c | 16 | ||||
-rw-r--r-- | legacy/evas/src/lib/engines/common/evas_text_utils.h | 4 |
3 files changed, 18 insertions, 5 deletions
diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c index 86925984f0..ce3ad5dea6 100644 --- a/legacy/evas/src/lib/canvas/evas_object_textblock.c +++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c | |||
@@ -2735,6 +2735,7 @@ _layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Text | |||
2735 | const Eina_Unicode *tbase; | 2735 | const Eina_Unicode *tbase; |
2736 | Evas_Object_Textblock_Text_Item *ti; | 2736 | Evas_Object_Textblock_Text_Item *ti; |
2737 | size_t cur_len = 0; | 2737 | size_t cur_len = 0; |
2738 | Eina_Unicode urepch = 0; | ||
2738 | 2739 | ||
2739 | /* prepare a working copy of the string, either filled by the repch or | 2740 | /* prepare a working copy of the string, either filled by the repch or |
2740 | * filled with the true values */ | 2741 | * filled with the true values */ |
@@ -2771,7 +2772,6 @@ _layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Text | |||
2771 | { | 2772 | { |
2772 | int i, ind; | 2773 | int i, ind; |
2773 | Eina_Unicode *ptr; | 2774 | Eina_Unicode *ptr; |
2774 | Eina_Unicode urepch; | ||
2775 | 2775 | ||
2776 | tbase = str = ptr = alloca((off + 1) * sizeof(Eina_Unicode)); | 2776 | tbase = str = ptr = alloca((off + 1) * sizeof(Eina_Unicode)); |
2777 | ind = 0; | 2777 | ind = 0; |
@@ -2824,6 +2824,7 @@ skip: | |||
2824 | c->par->bidi_props, ti->parent.text_pos, tmp_len); | 2824 | c->par->bidi_props, ti->parent.text_pos, tmp_len); |
2825 | } | 2825 | } |
2826 | } | 2826 | } |
2827 | ti->text_props.repch = urepch; | ||
2827 | str += tmp_len; | 2828 | str += tmp_len; |
2828 | cur_len -= tmp_len; | 2829 | cur_len -= tmp_len; |
2829 | 2830 | ||
diff --git a/legacy/evas/src/lib/engines/common/evas_font_draw.c b/legacy/evas/src/lib/engines/common/evas_font_draw.c index 5d1efb6d4d..5ea57ec10c 100644 --- a/legacy/evas/src/lib/engines/common/evas_font_draw.c +++ b/legacy/evas/src/lib/engines/common/evas_font_draw.c | |||
@@ -551,8 +551,12 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font | |||
551 | #else | 551 | #else |
552 | /* FIXME: Should be removed once we split according to script without | 552 | /* FIXME: Should be removed once we split according to script without |
553 | * the use of harfbuzz */ | 553 | * the use of harfbuzz */ |
554 | index = | 554 | if (text_props->repch) |
555 | evas_common_font_glyph_search(fn, &fi, text[EVAS_FONT_WALK_POS]); | 555 | index = |
556 | evas_common_font_glyph_search(fn, &fi, text_props->repch); | ||
557 | else | ||
558 | index = | ||
559 | evas_common_font_glyph_search(fn, &fi, text[EVAS_FONT_WALK_POS]); | ||
556 | 560 | ||
557 | if (index == 0) | 561 | if (index == 0) |
558 | { | 562 | { |
@@ -877,8 +881,12 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Eina_Unicode *in_text, con | |||
877 | #else | 881 | #else |
878 | /* FIXME: Should be removed once we split according to script without | 882 | /* FIXME: Should be removed once we split according to script without |
879 | * the use of harfbuzz */ | 883 | * the use of harfbuzz */ |
880 | index = | 884 | if (text_props->repch) |
881 | evas_common_font_glyph_search(fn, &fi, text[EVAS_FONT_WALK_POS]); | 885 | index = |
886 | evas_common_font_glyph_search(fn, &fi, text_props->repch); | ||
887 | else | ||
888 | index = | ||
889 | evas_common_font_glyph_search(fn, &fi, text[EVAS_FONT_WALK_POS]); | ||
882 | 890 | ||
883 | if (fi->src->current_size != fi->size) | 891 | if (fi->src->current_size != fi->size) |
884 | { | 892 | { |
diff --git a/legacy/evas/src/lib/engines/common/evas_text_utils.h b/legacy/evas/src/lib/engines/common/evas_text_utils.h index 21f8f3864e..687827a70d 100644 --- a/legacy/evas/src/lib/engines/common/evas_text_utils.h +++ b/legacy/evas/src/lib/engines/common/evas_text_utils.h | |||
@@ -23,6 +23,10 @@ struct _Evas_Text_Props | |||
23 | Evas_BiDi_Props bidi; | 23 | Evas_BiDi_Props bidi; |
24 | Evas_Script_Type script; | 24 | Evas_Script_Type script; |
25 | Evas_Text_Props_Info *info; | 25 | Evas_Text_Props_Info *info; |
26 | |||
27 | /* FIXME: just a hack in the meanwhile, remove when I can finally cache | ||
28 | * fi and split to scripts without harfbuzz */ | ||
29 | Eina_Unicode repch; | ||
26 | }; | 30 | }; |
27 | 31 | ||
28 | struct _Evas_Text_Props_Info | 32 | struct _Evas_Text_Props_Info |