Hi, The attached patch fixes a problem with fonts that include a trailing '\0' in name table entries. Currently the font name would have a question mark appended to it.
Huw.
>From 7949fcbd2e865b2a1fcf61a0cae04401169ea858 Mon Sep 17 00:00:00 2001 From: Huw Davies <h...@codeweavers.com> Date: Wed, 14 Mar 2012 11:12:23 +0000 Subject: [sfnt] Don't replace '\0' with question marks when converting strings from the name table. --- src/sfnt/sfobjs.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c index d7be631..10d188b 100644 --- a/src/sfnt/sfobjs.c +++ b/src/sfnt/sfobjs.c @@ -64,7 +64,7 @@ for ( n = 0; n < len; n++ ) { code = FT_NEXT_USHORT( read ); - if ( code < 32 || code > 127 ) + if ( code != 0 && ( code < 32 || code > 127 ) ) code = '?'; string[n] = (char)code; @@ -95,7 +95,7 @@ for ( n = 0; n < len; n++ ) { code = *read++; - if ( code < 32 || code > 127 ) + if ( code != 0 && ( code < 32 || code > 127 ) ) code = '?'; string[n] = (char)code; -- 1.7.0.4
_______________________________________________ Freetype-devel mailing list Freetype-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/freetype-devel