freetype-devel
[Top][All Lists]
Advanced

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

Re: More patches for t2gload.c


From: David Turner
Subject: Re: More patches for t2gload.c
Date: Wed, 05 Jul 2000 14:54:44 +0200

Hi Tom,

> 
> Caught a duplication of a point on a path.  Caused by calling
> add_point1 even if the path was already started.
> 
> Also, removed several ">> 16"s from the code.  There is really only
> one case where a ">> 16" is needed, and that is when reading a five
> byte encoded integer.  The Type 2 spec says that these are to be
> treated as 16.16 Fixed numbers (unlike how the Type 1 spec treats such
> encoded integers). Instead of shifting each operand left 16 only to
> shift right 16 when assigning to a point, just shift right on these 5
> byte integers and be done with it.
> 
Tom, keeping 16.16 numbers is important to implement multiple masters
in CFF correctly (granted, this is now out of the OpenType specification
but I wouldn't be surprised to see some pure-CFF multiple master some
day in a Distiller-generated document)..

And technically speaking, some operators like "div" or "sqrt" should better
return a 16.16 number to not lose accuracy..

We can get rid of it, but I have to wonder if this won't cause problems
with a number of fonts.. Have you tested your changes with a lot of them ?

> Also, please note that some of the problems I have been experiencing
> only occur with memtest.  It is not an issue with t2gload.c.  My
> mistake.
> 
No problem. Note that "memtest" never releases the blocks allocated even
when FT_Free is called. This is in order to more easily detect problems
(basically doubly allocated memory blocks indicate a serious overwrite
in memory). This is why it easily reaches "out of memory" :-)

- David

> Tom
> 
>   
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>                    Name: t2gload.diff
>    t2gload.diff    Type: Plain Text (TEXT/PLAIN)
>                Encoding: BASE64



reply via email to

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