Image magick not caching freetype rendered fonts?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
subhasish

Image magick not caching freetype rendered fonts?

Post by subhasish »

Hi All,

I was going through the RenderFreetype function in annotate.c. This function seems to init freetype library every time I call annotateImages API. Also this is not caching any font data but instead it inits freetype and renders all charecters each time. I am using Image Magick on Arm 9. My CPU frequency is about 400MHz. If Image Magick renders fonts each time, then I don't have any CPU time left to do other activities.

Is there any patch available such that Image Magick can cache the rendered fonts. Also I found that Qutopia uses fonts of format .qpf qtopia pre-rendered fonts. Is there any such options available in Image Magick as well.

Thanks and Regards,
Subhasish
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Image magick not caching freetype rendered fonts?

Post by magick »

Freetype includes a caching API but we have not gotten around to using it. Keep in mind that ImageMagick is open-source so you can write a patch to utilize cached fonts and post it here for inclusion in the ImageMagick distribution.
subhasish

Re: Image magick not caching freetype rendered fonts?

Post by subhasish »

Can u please let me know what that API is. Actually i tried freetype web site searching for something like this. But freetype simply said that its the complete responsibility of the higher level software to cache rendered fonts when using freetype.

Thanks,
Subhasish
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Image magick not caching freetype rendered fonts?

Post by magick »

We recall one of the Freetype demos included cached fonts. That would be a good place to start.
Post Reply