Hi,

Francis Kung wrote:
Hi,

In response to PR 27947
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27947) I've attached a
possible patch.  I'm not entirely convinced that it's the best solution,
though, so I'm posting it in the hope that someone may be able to
improve on it =)

It seems that when we cache the cairo_font_face_t in CairoGraphics2D
(well, the native peer), we lose the transform that was originally
applied to it.  In the patch, I've simply removed this caching
behaviour, and the jfig tests work.  Of course, that results in reduced
performance and isn't the ideal solution.

Can you quantify the reduction in performance? If it's not major, then I think this patch should go in and we can try different optimization strategies later.


I tried playing around with cairo_get/set_font_matrix as well, caching
and restoring it, but that didn't seem to have any effect; I'm not sure
what else could be reset and lost in the caching process which would
affect the transform...

Have you tried debugging cairo itself to see how it manages the transforms that CairoGraphics2D passes to it?

Tom

Reply via email to