[cairo] Problem with win32 font backend

Adrian Johnson ajohnson at redneon.com
Thu Jan 20 03:21:46 PST 2011

On 20/01/11 20:22, hrcairo at web.de wrote:
> Ok, now this code works on my system too (It didn't yesterday).
> However, when I try to set x_spacing and y_spacing to 1 and ROWS and COLS to 700 I still get the error and the corrupt file. So it occurs after a certain amount of characters.

It looks like each time you rotate a random amount and draw text cairo
is creating a new cairo_scaled_font_t and storing it in the recording
surface for the PDF backend. Each scaled font contains a win32 font
object and there is a limit to the number of win32 font objects.

As each different rotation results in a new scaled font, one possible
work around is to use a fixed set of different rotations (eg multiples
of 5 degrees) instead of a different rotation for every character.

More information about the cairo mailing list