forked from enlightenment/efl
Evas font: Renamed FONT_REND_ITALIC/BOLD -> FONT_REND_SLANT/WEIGHT.
This change is needed for future support of multiple level of runtime weight creation. SVN revision: 61943
This commit is contained in:
parent
473a719455
commit
4ec907df55
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue