diff options
author | Gary Wong <gtw@flux.utah.edu> | 2010-06-01 12:11:13 -0600 |
---|---|---|
committer | Gary Wong <gtw@flux.utah.edu> | 2010-06-01 12:11:13 -0600 |
commit | 3912bad35e17c393fbe03f6a1368cc61f3f2e040 (patch) | |
tree | fc26cd7c7b6c39424309b82b37839c28833fcebf | |
parent | 260a44476aea0912c28a71dbc92bc9fdfc83b76b (diff) |
Don't attempt to load non-existent characters.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | decorate-render.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2010-06-01 Gary Wong <gtw@gnu.org> + + * decorate-render.c (query_metrics): Don't try to load metrics + for charsets that don't include the character. + 2010-03-25 Gary Wong <gtw@gnu.org> * utf8.c (to_utf8): Fix ISO 8859-1 to UTF-8 conversion. diff --git a/decorate-render.c b/decorate-render.c index 23b9fdd..341fd9e 100644 --- a/decorate-render.c +++ b/decorate-render.c @@ -245,7 +245,7 @@ static void query_metrics( enum style_id style, uint32_t c, font = lookup_font( style, c ); /* Cache miss. */ - if( FT_Load_Char( font->face, c, font->load_flags ) ) { + if( !font || FT_Load_Char( font->face, c, font->load_flags ) ) { /* Couldn't load metrics. Don't bother evicting anything. */ *x_off = *y_off = 0; return; |