summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-01-15 14:49:31 +0000
committerTom Hacohen <tom@stosb.com>2013-01-15 14:49:31 +0000
commitc7dc78c98b606947917a3869974cfabd70612c10 (patch)
tree09b9b9c2cb6905f8193e77cabb18f341515fe366
parentd4da99698e5ce80c64d9ba4617e40062f8bde50c (diff)
Evas text props: Fixed bug with no-harfbuzz bidi.
SVN revision: 82814
-rw-r--r--ChangeLog1
-rw-r--r--NEWS1
-rw-r--r--src/lib/evas/common/evas_text_utils.c14
3 files changed, 10 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index dcbafe9fff..d8997ebdb7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
2 2
3 * Evas textblock: Fixed issue and simplified cursor_geometry_get. 3 * Evas textblock: Fixed issue and simplified cursor_geometry_get.
4 * Evas text: Fixed issue with horiz advance. 4 * Evas text: Fixed issue with horiz advance.
5 * Evas text utils: Fixed issue with no-harfbuzz bidi.
5 6
62013-01-14 Daniel Willmann 72013-01-14 Daniel Willmann
7 8
diff --git a/NEWS b/NEWS
index 5e941372bb..71325bdcee 100644
--- a/NEWS
+++ b/NEWS
@@ -115,3 +115,4 @@ Fixes:
115 * Fix SIGFPE in evas map update if image is 0. 115 * Fix SIGFPE in evas map update if image is 0.
116 * Evas textblock: Fixed issue and simplified cursor_geometry_get. 116 * Evas textblock: Fixed issue and simplified cursor_geometry_get.
117 * Evas text: Fixed issue with horiz advance. 117 * Evas text: Fixed issue with horiz advance.
118 * Evas text utils: Fixed issue with no-harfbuzz bidi.
diff --git a/src/lib/evas/common/evas_text_utils.c b/src/lib/evas/common/evas_text_utils.c
index 7dc9485378..bad68b20bb 100644
--- a/src/lib/evas/common/evas_text_utils.c
+++ b/src/lib/evas/common/evas_text_utils.c
@@ -234,8 +234,14 @@ evas_common_text_props_index_find(const Evas_Text_Props *props, int _cutoff)
234 234
235 return mid; 235 return mid;
236#else 236#else
237 return _cutoff; 237 if (props->bidi_dir == EVAS_BIDI_DIRECTION_RTL)
238 (void) props; 238 {
239 return props->len - _cutoff - 1;
240 }
241 else
242 {
243 return _cutoff;
244 }
239#endif 245#endif
240} 246}
241 247
@@ -249,7 +255,6 @@ evas_common_text_props_split(Evas_Text_Props *base,
249 size_t cutoff; 255 size_t cutoff;
250 256
251 /* Translate text cutoff pos to string object cutoff point */ 257 /* Translate text cutoff pos to string object cutoff point */
252#ifdef OT_SUPPORT
253 _cutoff = evas_common_text_props_index_find(base, _cutoff); 258 _cutoff = evas_common_text_props_index_find(base, _cutoff);
254 259
255 if (_cutoff >= 0) 260 if (_cutoff >= 0)
@@ -261,9 +266,6 @@ evas_common_text_props_split(Evas_Text_Props *base,
261 ERR("Couldn't find the cutoff position. Is it inside a cluster?"); 266 ERR("Couldn't find the cutoff position. Is it inside a cluster?");
262 return EINA_FALSE; 267 return EINA_FALSE;
263 } 268 }
264#else
265 cutoff = (size_t) _cutoff;
266#endif
267 269
268 evas_common_text_props_content_copy_and_ref(ext, base); 270 evas_common_text_props_content_copy_and_ref(ext, base);
269 if (base->bidi_dir == EVAS_BIDI_DIRECTION_RTL) 271 if (base->bidi_dir == EVAS_BIDI_DIRECTION_RTL)