freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with type1z and Subrs parsing


From: David Turner
Subject: Re: Problems with type1z and Subrs parsing
Date: Mon, 10 Jul 2000 16:22:21 +0200

Hi Tom,

> 
> Hi David,
> 
> >
> >   I have also found the source of the SEG fault, and it
> >   was a really stupid bug (forgetting to initialise a
> >   few blend tables correctly).. Aaarg..
> >
> >   I have no problem with the fonts I have here. Could
> >   interested parties test the latest CVS version with the
> >   fonts they own ??
> >
> 
> Works like a charm.  By the way, when I cvs updated, I didn't see
> which of the type1z files changed that fixed the seg fault.  I saw my
> patch come through, but that is about it...
> 

Well, it was simply in "z1load.c", where the following lines were
missing in t1_allocate_blend:

        /* allocate the blend `private' and `font_info' dictionaries */
        if ( ALLOC_ARRAY( blend->font_infos[1], num_designs, T1_FontInfo )  ||
             ALLOC_ARRAY( blend->privates[1], num_designs, T1_Private )     ||
             ALLOC_ARRAY( blend->weight_vector, num_designs * 2, FT_Fixed ) )
          goto Exit;

        blend->default_weight_vector = blend->weight_vector + num_designs;

        blend->font_infos[0] = &face->type1.font_info;
        blend->privates  [0] = &face->type1.private_dict;
        
+       for ( nn = 2; nn <= num_designs; nn++ )
+       {
+         blend->privates[nn]   = blend->privates[nn-1]+1;
+         blend->font_infos[nn] = blend->font_infos[nn-1]+1;
+       }
+        
        blend->num_designs   = num_designs;
      }


As I said, that was really stupid :-)

- David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]