[cairo] null stream pdf surface

Behdad Esfahbod behdad at behdad.org
Wed Aug 25 12:11:09 PDT 2010

On 08/24/10 16:32, Kozhevnikov Mikhail wrote:

> In the other one we have to fit the content into given target image size. In the latter case, I'd like to render it into a temporary surface and then copy to the target surface with scaling.

You shouldn't do that.  You should measure it at a nominal size, scale, and
draw to the target.  If you do that, you still find that your text doesn't
quite fit in.  That's because (unfortunately) cairo doesn't do fully linearly
scalable text yet :(.  What I suggest you do is to get the path for the text
at the nominal size, scale, append path, fill.

Hope that helps,

More information about the cairo mailing list