Evas textblock + font engine: Don't take inset into account when not needed.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 13 Oct 2010 13:33:59 +0000 (13:33 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 13 Oct 2010 13:33:59 +0000 (13:33 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@53353 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c
src/lib/engines/common/evas_font_query.c

index f863f11..4ae8abd 100644 (file)
@@ -6598,7 +6598,7 @@ evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_C
                    pos,
                    &x, &y, &w, &h);
           }
-       x += ln->x + it->x - it->inset;
+       x += ln->x + it->x;
        if (x < ln->x)
          {
             x = ln->x;
@@ -7251,9 +7251,9 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
              yoff = (it->format->valign * (double)(ln->h - it->h)) + it->baseline; \
              if (clip) \
                { \
-                  if ((obj->cur.geometry.x + x + ln->x + it->x - it->inset + it->w) < (cx - 20)) \
+                  if ((obj->cur.geometry.x + x + ln->x + it->x + it->w) < (cx - 20)) \
                   continue; \
-                  if ((obj->cur.geometry.x + x + ln->x + it->x - it->inset) > (cx + cw + 20)) \
+                  if ((obj->cur.geometry.x + x + ln->x + it->x) > (cx + cw + 20)) \
                   break; \
                }
 
@@ -7274,7 +7274,7 @@ evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void
          (obj->cur.cache.clip.a * it->format->color.col.a * (amul)) / 65025);
 # define DRAW_TEXT(ox, oy) \
    if (it->format->font.font) ENFN->font_draw(output, context, surface, it->format->font.font, \
-         obj->cur.geometry.x + ln->x + it->x - it->inset + x + (ox), \
+         obj->cur.geometry.x + ln->x + it->x + x + (ox), \
          obj->cur.geometry.y + ln->y + yoff + y + (oy), \
          it->w, it->h, it->w, it->h, it->text, &it->bidi_props);
 # if 0
index 7bb8822..d23f127 100644 (file)
@@ -440,8 +440,8 @@ evas_common_font_query_char_coords(RGBA_Font *fn, const Eina_Unicode *in_text, c
             last_adv = fg->glyph->advance.x >> 16;
          }
        if (kern < 0) kern = 0;
-        chr_x = (pen_x - kern);
-       chr_y = (pen_y);
+        chr_x = (pen_x - kern) + (fg->glyph_out->left);
+       chr_y = (pen_y) + (fg->glyph_out->top);
         chr_w = fg->glyph_out->bitmap.width + (kern);
 /*     if (text[chr]) */
          {