Evas font-engine: Fix searching of fonts to ignore more control characters.

SVN revision: 59499
This commit is contained in:
Tom Hacohen 2011-05-18 11:18:08 +00:00
parent fccfbf78b0
commit b831d3c1e1
1 changed files with 14 additions and 2 deletions

View File

@ -225,9 +225,21 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
text_props->script) ;
base_char++)
;
if (!*base_char && (base_char > text)) base_char--;
if (!*base_char) base_char = text;
evas_common_font_glyph_search(fn, &fi, *base_char);
/* Find the first renderable char, and if there is none, find
* one that can show the replacement char. */
while (*base_char)
{
/* 0x1F is the last ASCII contral char. */
if ((*base_char > 0x1F) &&
evas_common_font_glyph_search(fn, &fi, *base_char))
break;
base_char++;
}
if (!*base_char)
evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR);
}
text_props->font_instance = fi;