Hey,

Explanation about the fix:
I added evas_object_text_last_up_to_pos function quite some time ago, it
lets functions know the position of the last char up to a specific x
position.
evas_object_text_last_up_to_pos's behavior is pretty much the same as
evas_object_text_char_coords_get's behavior when fed with LTR text and the
position of the last char,
their behavior differ when they are fed with RTL text. As the RTL function's
last char is positioned at the left, which means it's x value is at the left
and cropping will be wrong.

This fix calls the evas_object_text_last_up_to_pos instead of the other one
in order to correct edje's wrong line chops.

Ciao,
-- 
Tom.
Index: edje/src/lib/edje_text.c
===================================================================
--- edje/src/lib/edje_text.c	(revision 43860)
+++ edje/src/lib/edje_text.c	(working copy)
@@ -135,13 +135,13 @@
    if (tw > sw)
      {
 	if (params->type.text.elipsis != 0.0)
-	  c1 = evas_object_text_char_coords_get(ep->object,
-		-p + l, th / 2,
-		NULL, NULL, NULL, NULL);
+          /* should be the last in text! not the rightmost */
+          c1 = evas_object_text_last_up_to_pos(ep->object,
+                -p + l, th / 2);
 	if (params->type.text.elipsis != 1.0)
-	  c2 = evas_object_text_char_coords_get(ep->object,
-		-p + sw - r, th / 2,
-		NULL, NULL, NULL, NULL);
+          /* should be the last in text! not the rightmost */
+          c2 = evas_object_text_last_up_to_pos(ep->object,
+                -p + sw - r, th / 2);
 	if ((c1 < 0) && (c2 < 0))
 	  {
 	     c1 = 0;
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to