Page 1 of 1

Image magick not caching freetype rendered fonts?

Posted: 2008-08-23T04:33:39-07:00
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

Re: Image magick not caching freetype rendered fonts?

Posted: 2008-08-23T07:08:35-07:00
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.

Re: Image magick not caching freetype rendered fonts?

Posted: 2008-08-23T12:55:38-07:00
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

Re: Image magick not caching freetype rendered fonts?

Posted: 2008-08-23T13:28:50-07:00
by magick
We recall one of the Freetype demos included cached fonts. That would be a good place to start.