forked from enlightenment/efl
Evas font-engine: Fix glyphs not being drawn.
Thanks to Brian Wang for the report. This happened because we were querying for the index of the wrong fi, this became especially visible after we started caching fi. SVN revision: 59152
This commit is contained in:
parent
fdb32980b5
commit
2e71b5ab90
|
@ -20,6 +20,7 @@ EAPI int evas_common_font_get_line_advance (RGBA_Font *fn);
|
||||||
EAPI void evas_common_font_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_props);
|
EAPI void evas_common_font_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_props);
|
||||||
EAPI int evas_common_font_glyph_search (RGBA_Font *fn, RGBA_Font_Int **fi_ret, int gl);
|
EAPI int evas_common_font_glyph_search (RGBA_Font *fn, RGBA_Font_Int **fi_ret, int gl);
|
||||||
EAPI RGBA_Font_Glyph *evas_common_font_int_cache_glyph_get (RGBA_Font_Int *fi, FT_UInt index);
|
EAPI RGBA_Font_Glyph *evas_common_font_int_cache_glyph_get (RGBA_Font_Int *fi, FT_UInt index);
|
||||||
|
EAPI FT_UInt evas_common_get_char_index (RGBA_Font_Int* fi, int gl);
|
||||||
EAPI void evas_common_font_draw_init (void);
|
EAPI void evas_common_font_draw_init (void);
|
||||||
|
|
||||||
/* load */
|
/* load */
|
||||||
|
|
|
@ -290,8 +290,8 @@ struct _Font_Char_Index
|
||||||
int gl;
|
int gl;
|
||||||
};
|
};
|
||||||
|
|
||||||
static FT_UInt
|
EAPI FT_UInt
|
||||||
_evas_common_get_char_index(RGBA_Font_Int* fi, int gl)
|
evas_common_get_char_index(RGBA_Font_Int* fi, int gl)
|
||||||
{
|
{
|
||||||
Font_Char_Index result;
|
Font_Char_Index result;
|
||||||
//FT_UInt ret;
|
//FT_UInt ret;
|
||||||
|
@ -379,7 +379,7 @@ evas_common_font_glyph_search(RGBA_Font *fn, RGBA_Font_Int **fi_ret, int gl)
|
||||||
}
|
}
|
||||||
if (fi->src->ft.face)
|
if (fi->src->ft.face)
|
||||||
{
|
{
|
||||||
index = _evas_common_get_char_index(fi, gl);
|
index = evas_common_get_char_index(fi, gl);
|
||||||
if (index != 0)
|
if (index != 0)
|
||||||
{
|
{
|
||||||
if (!fi->ft.size)
|
if (!fi->ft.size)
|
||||||
|
|
|
@ -233,9 +233,7 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
|
||||||
/* If we got a malformed index, show the replacement char instead */
|
/* If we got a malformed index, show the replacement char instead */
|
||||||
if (gl_itr->index == 0)
|
if (gl_itr->index == 0)
|
||||||
{
|
{
|
||||||
/* FIXME: search inside the same fi. */
|
gl_itr->index = evas_common_get_char_index(fi, REPLACEMENT_CHAR);
|
||||||
gl_itr->index =
|
|
||||||
evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR);
|
|
||||||
is_replacement = EINA_TRUE;
|
is_replacement = EINA_TRUE;
|
||||||
}
|
}
|
||||||
index = gl_itr->index;
|
index = gl_itr->index;
|
||||||
|
@ -328,10 +326,10 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
|
||||||
_gl = *text;
|
_gl = *text;
|
||||||
if (_gl == 0) break;
|
if (_gl == 0) break;
|
||||||
|
|
||||||
index = evas_common_font_glyph_search(fn, &fi, _gl);
|
index = evas_common_get_char_index(fi, _gl);
|
||||||
if (index == 0)
|
if (index == 0)
|
||||||
{
|
{
|
||||||
index = evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR);
|
index = evas_common_get_char_index(fi, REPLACEMENT_CHAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Should we really set the size per fi? This fixes a bug for Korean
|
/* Should we really set the size per fi? This fixes a bug for Korean
|
||||||
|
|
Loading…
Reference in New Issue