freetype
[Top][All Lists]
Advanced

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

RE: [Freetype] Freetype is very slow at opening large Postscript Asian f


From: Pedriana, Paul
Subject: RE: [Freetype] Freetype is very slow at opening large Postscript Asian fonts...
Date: Mon, 4 Nov 2002 20:44:57 -0800

So the new loop withing PS_Table_Add (from psobjs.c) could look like
this:


   FT_Error  PS_Table_Add( PS_Table*  table,
                           FT_Int     index,
                           void*      object,
                           FT_Int     length )
   {
      .
      .
      .
      while ( new_size < table->cursor + length )
      {
         /* Increase size by 25% and then round up to */
         /* nearest multiple of 1024.                 */
         new_size = new_size * 5 / 4;
         new_size = (new_size + 1023) & -1024;
      }
      .
      .
      .
   }

Paul




-----Original Message-----
From: Juliusz Chroboczek [mailto:address@hidden 
Sent: Monday, November 04, 2002 2:44 AM
To: address@hidden
Subject: Re: [Freetype] Freetype is very slow at opening large
Postscript Asian fonts...

PP> Until I hear back from somebody, I'll just change my version of the 
PP> code to new_size *= 2 so I can stop getting bug reports that my app 
PP> has hung.

I would like to suggest new_size becomes new_size * 5/4 rounded up to
the next multiple of 1024.  This will have good behaviour for small
fonts (by going up by 1KB for small tables that are beneath 4KB) while
at the same time providing the exponential behaviour that you're after.

                                        Juliusz


_______________________________________________
Freetype mailing list
address@hidden http://www.freetype.org/mailman/listinfo/freetype



reply via email to

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