Evas textblock: Add glyphs shaping exception with checking language script 47/66947/2
authorYoungbok Shin <youngb.shin@samsung.com>
Fri, 22 Apr 2016 07:18:41 +0000 (16:18 +0900)
committerYoungbok Shin <youngb.shin@samsung.com>
Mon, 25 Apr 2016 04:25:30 +0000 (21:25 -0700)
@tizen_fix

Change-Id: I1f517cea5bfdf3e40aae675497500b5bb6a0c210

src/lib/evas/canvas/evas_object_text.c
src/lib/evas/canvas/evas_object_textblock.c
src/lib/evas/common/evas_text_utils.h

index d92042a..563c126 100644 (file)
@@ -543,10 +543,17 @@ _evas_object_text_item_new(Evas_Object_Protected_Data *obj,
 
    if (fi)
      {
+        /* TIZEN_ONLY(20160422): Add glyphs shaping exception with checking language script.
         ENFN->font_text_props_info_create(ENDT,
               fi, str + pos, &it->text_props,
               o->bidi_par_props, it->text_pos, len, EVAS_TEXT_PROPS_MODE_SHAPE,
               o->cur.fdesc->lang);
+         */
+        ENFN->font_text_props_info_create(ENDT,
+              fi, str + pos, &it->text_props,
+              o->bidi_par_props, it->text_pos, len, EVAS_TEXT_PROPS_MODE_CHECK(script),
+              o->cur.fdesc->lang);
+        /* END */
         _evas_object_text_item_update_sizes(obj, o, it);
      }
    o->items = (Evas_Object_Text_Item *)
index 13169e1..c4101ea 100644 (file)
@@ -4094,10 +4094,17 @@ skip:
 
              if (cur_fi)
                {
+                  /* TIZEN_ONLY(20160422): Add glyphs shaping exception with checking language script.
                   ENFN->font_text_props_info_create(ENDT,
                         cur_fi, str, &ti->text_props, c->par->bidi_props,
                         ti->parent.text_pos, run_len, EVAS_TEXT_PROPS_MODE_SHAPE,
                         ti->parent.format->font.fdesc->lang);
+                   */
+                  ENFN->font_text_props_info_create(ENDT,
+                        cur_fi, str, &ti->text_props, c->par->bidi_props,
+                        ti->parent.text_pos, run_len, EVAS_TEXT_PROPS_MODE_CHECK(script),
+                        ti->parent.format->font.fdesc->lang);
+                  /* END */
                }
 
              while ((queue->start + queue->off) < (run_start + run_len))
@@ -4780,10 +4787,17 @@ _layout_ellipsis_item_new(Ctxt *c, const Evas_Object_Textblock_Item *cur_it)
               ellip_ti->parent.format->font.font, &script_fi, &cur_fi,
               script, _ellip_str, len);
 
+        /* TIZEN_ONLY(20160422): Add glyphs shaping exception with checking language script.
         ENFN->font_text_props_info_create(ENDT,
               cur_fi, _ellip_str, &ellip_ti->text_props,
               c->par->bidi_props, ellip_ti->parent.text_pos, len, EVAS_TEXT_PROPS_MODE_SHAPE,
               ellip_ti->parent.format->font.fdesc->lang);
+         */
+        ENFN->font_text_props_info_create(ENDT,
+              cur_fi, _ellip_str, &ellip_ti->text_props,
+              c->par->bidi_props, ellip_ti->parent.text_pos, len, EVAS_TEXT_PROPS_MODE_CHECK(script),
+              ellip_ti->parent.format->font.fdesc->lang);
+        /* END */
      }
 
    _text_item_update_sizes(c, ellip_ti);
@@ -7580,10 +7594,17 @@ _layout_hyphen_item_new(Ctxt *c, const Evas_Object_Textblock_Text_Item *cur_ti)
               hyphen_ti->parent.format->font.font, &script_fi, &cur_fi,
               script, _hyphen_str, len);
 
+        /* TIZEN_ONLY(20160422): Add glyphs shaping exception with checking language script.
         ENFN->font_text_props_info_create(ENDT,
               cur_fi, _hyphen_str, &hyphen_ti->text_props,
               c->par->bidi_props, hyphen_ti->parent.text_pos, len, EVAS_TEXT_PROPS_MODE_SHAPE,
               hyphen_ti->parent.format->font.fdesc->lang);
+         */
+        ENFN->font_text_props_info_create(ENDT,
+              cur_fi, _hyphen_str, &hyphen_ti->text_props,
+              c->par->bidi_props, hyphen_ti->parent.text_pos, len, EVAS_TEXT_PROPS_MODE_CHECK(script),
+              hyphen_ti->parent.format->font.fdesc->lang);
+        /* END */
      }
 
    _text_item_update_sizes(c, hyphen_ti);
index 96f3d2a..040b532 100644 (file)
@@ -45,6 +45,12 @@ typedef enum
    (0x0E33 == (x))
 //
 
+/* TIZEN_ONLY(20160422): Add glyphs shaping exception with checking language script. */
+#define EVAS_TEXT_PROPS_MODE_CHECK(script) \
+   ((script == EVAS_SCRIPT_LATIN) ? \
+    EVAS_TEXT_PROPS_MODE_NONE : EVAS_TEXT_PROPS_MODE_SHAPE)
+/* END */
+
 typedef struct _Evas_Glyph Evas_Glyph;
 typedef struct _Evas_Glyph_Array Evas_Glyph_Array;