Evas font: Renamed FONT_REND_ITALIC/BOLD -> FONT_REND_SLANT/WEIGHT.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 1 Aug 2011 09:11:42 +0000 (09:11 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 1 Aug 2011 09:11:42 +0000 (09:11 +0000)
This change is needed for future support of multiple level of runtime
weight creation.

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

src/lib/canvas/evas_font_dir.c
src/lib/engines/common/evas_font_load.c
src/lib/engines/common/evas_font_main.c
src/lib/include/evas_common.h

index b9259ea..f9ee936 100644 (file)
@@ -509,9 +509,9 @@ evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Eva
    fdesc->new = EINA_FALSE;
 
    if (fdesc->slant != EVAS_FONT_SLANT_NORMAL)
-      wanted_rend |= FONT_REND_ITALIC;
+      wanted_rend |= FONT_REND_SLANT;
    if (fdesc->weight == EVAS_FONT_WEIGHT_BOLD)
-      wanted_rend |= FONT_REND_BOLD;
+      wanted_rend |= FONT_REND_WEIGHT;
 
    evas_font_init();
 
index 48d3df0..ceaf0c7 100644 (file)
@@ -431,16 +431,16 @@ evas_common_font_int_load_complete(RGBA_Font_Int *fi)
    fi->max_h += ret;
 
    /* If the loaded font doesn't match with wanted_rend value requested by
-    * textobject and textblock, Set the runtime_rend value as FONT_REND_ITALIC
-    * or FONT_REND_BOLD for software rendering. */
+    * textobject and textblock, Set the runtime_rend value as FONT_REND_SLANT
+    * or FONT_REND_WEIGHT for software rendering. */
    fi->runtime_rend = FONT_REND_REGULAR;
-   if ((fi->wanted_rend & FONT_REND_ITALIC) &&
+   if ((fi->wanted_rend & FONT_REND_SLANT) &&
        !(fi->src->ft.face->style_flags & FT_STYLE_FLAG_ITALIC))
-      fi->runtime_rend |= FONT_REND_ITALIC;
+      fi->runtime_rend |= FONT_REND_SLANT;
 
-   if ((fi->wanted_rend & FONT_REND_BOLD) &&
+   if ((fi->wanted_rend & FONT_REND_WEIGHT) &&
        !(fi->src->ft.face->style_flags & FT_STYLE_FLAG_BOLD))
-      fi->runtime_rend |= FONT_REND_BOLD;
+      fi->runtime_rend |= FONT_REND_WEIGHT;
 
    return fi;
 }
index a69c3cc..1272e89 100644 (file)
@@ -368,10 +368,10 @@ evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx)
      }
 
    /* Transform the outline of Glyph according to runtime_rend. */
-   if (fi->runtime_rend & FONT_REND_ITALIC)
+   if (fi->runtime_rend & FONT_REND_SLANT)
       FT_Outline_Transform(&fi->src->ft.face->glyph->outline, &transform);
    /* Embolden the outline of Glyph according to rundtime_rend. */
-   if (fi->runtime_rend & FONT_REND_BOLD)
+   if (fi->runtime_rend & FONT_REND_WEIGHT)
       FT_Outline_Embolden(&fi->src->ft.face->glyph->outline,
             (fi->src->ft.face->size->metrics.x_ppem * 5 * 64) / 100);
 
index e75da14..ddaefb8 100644 (file)
@@ -470,8 +470,8 @@ typedef enum _Font_Hint_Flags
 typedef enum _Font_Rend_Flags
 {
    FONT_REND_REGULAR   = 0,
-   FONT_REND_ITALIC    = (1 << 0),
-   FONT_REND_BOLD      = (1 << 1),
+   FONT_REND_SLANT     = (1 << 0),
+   FONT_REND_WEIGHT    = (1 << 1),
 } Font_Rend_Flags;
 
 /*****************************************************************************/