diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2007-12-02 18:38:31 +0000 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2007-12-02 18:38:31 +0000 |
| commit | 5527360cf7e5b68a1954874c82128690ed7df488 (patch) | |
| tree | 5523c2e2c9968179f0cb9bf0752612d31a19f65d /error.c | |
| parent | 9f1e64f3255128130020f9bb636e17234f8a3d69 (diff) | |
| download | halibut-5527360cf7e5b68a1954874c82128690ed7df488.zip halibut-5527360cf7e5b68a1954874c82128690ed7df488.tar.gz halibut-5527360cf7e5b68a1954874c82128690ed7df488.tar.bz2 halibut-5527360cf7e5b68a1954874c82128690ed7df488.tar.xz | |
Cope with TrueType fonts with slightly broken cmaps, just ignoring code points
that can't be resolved (apart from warning about it).
[originally from svn r7800]
Diffstat (limited to 'error.c')
| -rw-r--r-- | error.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -18,7 +18,7 @@ static void do_error(int code, va_list ap) { char c; int i, j; char *sp, *sp2; - wchar_t *wsp, *wsp2; + wchar_t *wsp, *wsp2, wc; filepos fpos, fpos2, *fposp; int flags = 0; @@ -374,6 +374,14 @@ static void do_error(int code, va_list ap) { sprintf(error, "font has an invalid header"); flags = FILEPOS; break; + case err_sfntbadglyph: + fpos = *va_arg(ap, filepos *); + wc = va_arg(ap, wchar_t); + sprintf(error, + "warning: character U+%04X references an non-existent glyph", + wc); + flags = FILEPOS; + break; case err_whatever: sp = va_arg(ap, char *); vsprintf(error, sp, ap); |