Revert "Snap 2" - didn't mean to commit it. :(
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Jan 2011 13:57:55 +0000 (13:57 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Jan 2011 13:57:55 +0000 (13:57 +0000)
This reverts commit 66c113787b440a282b6cc2cab6d35f5c700627f4.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@56555 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common/evas_font_default_walk.x
src/lib/engines/common/evas_font_draw.c
src/lib/engines/common/evas_font_query.c

index 75c9906..2071e2d 100644 (file)
@@ -32,7 +32,7 @@
    do \
      { \
         int visible = 1; \
-        for (char_index = text_props->start ; char_index < text_props->start + text_props->len ; char_index++) \
+        for (char_index = 0 ; char_index < text_props->len ; char_index++) \
           {
 
 /**
@@ -64,9 +64,7 @@
              char_index = 0; \
              _char_index_d = 1; \
           } \
-        char_index += text_props->start; \
-        _i += text_props->start; \
-        for ( ; _i > text_props->start ; char_index += _char_index_d, _i--) \
+        for ( ; _i > 0 ; char_index += _char_index_d, _i--) \
           {
 #else
 #define EVAS_FONT_WALK_TEXT_LOGICAL_START() EVAS_FONT_WALK_TEXT_VISUAL_START()
 #define EVAS_FONT_WALK_PEN_Y (EVAS_FONT_ROUND_26_6_TO_INT(_pen_y))
 #define EVAS_FONT_WALK_Y_ADV (0)
 #define EVAS_FONT_WALK_IS_LAST \
-             (char_index + 1 == text_props->start + text_props->len)
+             (char_index + 1 == text_props->len)
 #define EVAS_FONT_WALK_IS_FIRST \
              (!char_index)
 #define EVAS_FONT_WALK_LEN (text_props->len)
index a4c81d7..9e8cc5c 100644 (file)
@@ -535,7 +535,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
              LKU(fi->ft_mutex);
              continue;
           }
-        if (EVAS_FONT_CHARACTER_IS_INVISIBLE(text[EVAS_FONT_WALK_POS - text_props->start]))
+        if (EVAS_FONT_CHARACTER_IS_INVISIBLE(text[EVAS_FONT_WALK_POS]))
           {
              visible = 0;
           }
index bd5322b..0f21992 100644 (file)
@@ -202,7 +202,6 @@ evas_common_font_query_char_coords(RGBA_Font *fn, const Eina_Unicode *in_text, c
         goto end;
      }
 
-   position += text_props->start;
    Evas_Coord cluster_start, last_end;
    int prev_cluster = -1;
    int found = 0, items = 1, item_pos = 1;
@@ -336,7 +335,6 @@ evas_common_font_query_pen_coords(RGBA_Font *fn, const Eina_Unicode *in_text, co
    int prev_cluster = -1;
    int found = 0, items = 1, item_pos = 1;
    int last_is_visible = 1;
-   position += text_props->start;
    EVAS_FONT_WALK_TEXT_VISUAL_START()
      {
         EVAS_FONT_WALK_TEXT_WORK();
@@ -498,7 +496,7 @@ evas_common_font_query_char_at_coords(RGBA_Font *fn, const Eina_Unicode *in_text
      }
 end:
 
-   return ret_val - text_props->start;
+   return ret_val;
 }
 
 /* position of the char after the last char in the text that will fit in xy.
@@ -509,7 +507,7 @@ end:
  */
 
 EAPI int
-evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Eina_Unicode *in_text, const Evas_Text_Props *text_props, int x, int y)
+evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Eina_Unicode *in_text, const Evas_Text_Props *text_props __UNUSED__, int x, int y)
 {
    int asc, desc;
    int ret=-1;
@@ -534,6 +532,6 @@ evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Eina_Unicode *in_text
 
 end:
 
-  return ret - text_props->start;
+  return ret;
 }