freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] [PATCH] Stroked Glyph Caching


From: Werner LEMBERG
Subject: Re: [ft-devel] [PATCH] Stroked Glyph Caching
Date: Sun, 12 Aug 2012 10:17:02 +0200 (CEST)

> I have added support to cache stroked glyphs.  This introduces
> caching for stroked glyphs for both a sbitmap, and a regular image
> glyph.  Also, support has been added to the FTC_Manager to cache
> FT_Stroker objects.

I've just had a closer look, and it looks very good!

> Modified API:
> 
> * FTC_Manager_New() - now takes an additional argument for the
> *                     number of FT_Stroker objects to cache.

This is a problem, and I ask others to chime in for discussion.  While
the FreeType cache code is tagged as beta, I believe that many
applications already use it.  Additionally, its interface hasn't
changed for a long time, so it is probably better to stay with it
as-is.

In general, I don't like the approach of FTC_Manager_New to specify
maximum values for various objects.  As your patch shows, it makes it
virtually impossible to extend the cache functionality without
breaking the API.

Instead, I suggest to use properties, cf. this thread:

  http://lists.gnu.org/archive/html/freetype-devel/2012-07/msg00055.html
  http://lists.gnu.org/archive/html/freetype-devel/2012-08/msg00022.html

What do you think?  I'll soon start with coding the infrastructure.

> One thing I would note about the patch is the hash of a
> FTC_StrokerTypeRec just adds the data together.  I don't think this
> is the best hash method, but hopefully you guys have some better
> ideas.

Regarding myself, I don't have a better idea :-) Maybe there are
people on this list who have more experience with that.


    Werner



reply via email to

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