[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] query about GSUB
From: |
Werner LEMBERG |
Subject: |
Re: [Devel] query about GSUB |
Date: |
Thu, 18 Jan 2001 20:01:24 +0100 (CET) |
> We are using Extension engine of free-type for almost a year
> or so.
Very nice! So it seems to work with Indic fonts (which I've never
tested)... Is it possible to see your results somewhere?
I would be glad to hear more about your experience with the FreeType's
OpenType interface since we are going to improve it right now (i.e.,
we are going to implement a text layout library on top of FreeType 2).
> in the file ftxgsub.c in function TT_GSUB_Add_String() there
> is a line which says
>
> ULong size = out->pos + num_out + 256L;
>
> I do not know why *256* is added to the size, it is causing big
> memory leak, so i changed it to
>
> ULong size = out->pos + num_out;
>
> and still the things work, i just wanted to know if i am missing out
> on something important or it is really a bug.
The idea is to allocate additional 256 bytes of memory to avoid
reallocation again and again:
if ( out->pos + num_out >= out->allocated )
{
ULong size = out->pos + num_out + 256L;
...
Where is the problem? Maybe 256 is chosen too large. And what kind
of `memory leak'? Maybe waste of memory. In the docs it is written
you have to manually deallocate a TTO_GSUB_String object if it isn't
used anymore.
Werner