« Return to Thread: Font handling a little clunky and not thread-safe?

Re: Font handling a little clunky and not thread-safe?

by Jim Barry-2 :: Rate this Message:

Reply to Author | View in Thread

Vinnie wrote:
> Can anyone share techniques or patches for improving the font
> handling? Myself, I have mostly rewritten agg_font_freetype and
> agg_font_cache_manager. The design of the cache was incompatible with
> multithreading. I made the cached font, and face objects independent,
> so they can be constructed without an associated manager or cache.    

Yes, same here. I had to rewrite the font stuff pretty much from scratch. I'm only interested in vector fonts so I was able to simplify the code quite a bit, and also to make some optimisations. For example, I simply store each glyph outline in a path_storage object, and I convert the curves to straight-line segments once at load time, instead of doing it every time a glyph is rendered. Fortunately my GUI is all in one thread, so I don't have to worry about thread safety :)

- Jim

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Vector-agg-general mailing list
Vector-agg-general@...
https://lists.sourceforge.net/lists/listinfo/vector-agg-general

 « Return to Thread: Font handling a little clunky and not thread-safe?