glyph metrics.
Instead of having to render the glyph to get the width and horizontal
bearing of it, it's possible to get this information from the glyph
metrics (which are available on the glyph slot).
This change now allows Evas to only render the glyph at the rendering
phase, instead of having to render it during layout phase.
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@71132
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
return NULL;
}
if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
return NULL;
}
+ fg->width = EVAS_FONT_ROUND_26_6_TO_INT(
+ fi->src->ft.face->glyph->metrics.width);
+ fg->x_bear = EVAS_FONT_ROUND_26_6_TO_INT(
+ fi->src->ft.face->glyph->metrics.horiBearingX);
fg->index = idx;
fg->fi = fi;
fg->index = idx;
fg->fi = fi;
LKU(fi->ft_mutex);
continue;
}
LKU(fi->ft_mutex);
continue;
}
- if ((!fg->glyph_out) && (!evas_common_font_int_cache_glyph_render(fg)))
- {
- LKU(fi->ft_mutex);
- continue;
- }
- gl_itr->x_bear = fg->glyph_out->left;
- gl_itr->width = fg->glyph_out->bitmap.width;
+ gl_itr->x_bear = fg->x_bear;
+ gl_itr->width = fg->width;
/* text_props->info->glyph[char_index].advance =
* text_props->info->glyph[char_index].index =
* already done by the ot function */
/* text_props->info->glyph[char_index].advance =
* text_props->info->glyph[char_index].index =
* already done by the ot function */
fg = evas_common_font_int_cache_glyph_get(fi, idx);
if (!fg) continue;
fg = evas_common_font_int_cache_glyph_get(fi, idx);
if (!fg) continue;
- if ((!fg->glyph_out) && (!evas_common_font_int_cache_glyph_render(fg)))
- continue;
kern = 0;
if ((use_kerning) && (prev_index) && (idx) &&
kern = 0;
if ((use_kerning) && (prev_index) && (idx) &&
pface = fi->src->ft.face;
gl_itr->index = idx;
pface = fi->src->ft.face;
gl_itr->index = idx;
- gl_itr->x_bear = fg->glyph_out->left;
+ gl_itr->x_bear = fg->x_bear;
adv = fg->glyph->advance.x >> 10;
adv = fg->glyph->advance.x >> 10;
- gl_itr->width = fg->glyph_out->bitmap.width;
+ gl_itr->width = fg->width;
if (EVAS_FONT_CHARACTER_IS_INVISIBLE(_gl))
{
if (EVAS_FONT_CHARACTER_IS_INVISIBLE(_gl))
{
struct _RGBA_Font_Glyph
{
FT_UInt index;
struct _RGBA_Font_Glyph
{
FT_UInt index;
+ Evas_Coord width;
+ Evas_Coord x_bear;
FT_Glyph glyph;
FT_BitmapGlyph glyph_out;
/* this is a problem - only 1 engine at a time can extend such a font... grrr */
FT_Glyph glyph;
FT_BitmapGlyph glyph_out;
/* this is a problem - only 1 engine at a time can extend such a font... grrr */