From 623160b690e8446f5f815370d082cc9e35183868 Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Tue, 1 Aug 2000 04:29:25 +0000 Subject: [PATCH] Some simple patches that allow synthetic fonts to be rendered. *However*: although the FontMatrix is read correctly, it does _not_ seem to be used! I don't understand this... --- src/type1z/z1load.c | 8 ++++++++ src/type1z/z1parse.c | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/src/type1z/z1load.c b/src/type1z/z1load.c index 7877c0644..7d63a34e3 100644 --- a/src/type1z/z1load.c +++ b/src/type1z/z1load.c @@ -1072,6 +1072,10 @@ FT_Fixed temp[4]; + if ( matrix->xx || matrix->yx ) + /* with synthetic fonts, it's possible we get here twice */ + return; + (void)Z1_ToFixedArray( parser, 4, temp, 3 ); matrix->xx = temp[0]; matrix->yx = temp[1]; @@ -1326,6 +1330,10 @@ FT_Int n; + if ( loader->num_glyphs ) + /* with synthetic fonts, it's possible we get here twice */ + return; + loader->num_glyphs = Z1_ToInt( parser ); if ( parser->error ) return; diff --git a/src/type1z/z1parse.c b/src/type1z/z1parse.c index eecb6068c..dcd039c34 100644 --- a/src/type1z/z1parse.c +++ b/src/type1z/z1parse.c @@ -868,6 +868,10 @@ FT_Memory memory = parser->memory; FT_UInt len = limit-cur; + if ( *(FT_String**)q ) + /* with synthetic fonts, it's possible to find a field twice */ + break; + if ( ALLOC( string, len + 1 ) ) goto Exit;