[cairo] Font size, how to make it very small?

Behdad Esfahbod behdad at behdad.org
Mon Sep 11 08:41:20 PDT 2006

On Mon, 2006-09-11 at 11:20 -0400, Dirk Schönberger wrote:
> > Umm, maybe we should add a note to that page.  It's correct to use those
> > numbers in those snippets as the normalize_snippet call is adding a huge
> > scale and as you see all coordinates are also < 1.0
> Does this means that cairo scales the font size, instead of the curve
> outlines
> for the text?

Kinda.  Cairo cares about font_size * ctm (or rather, font_matrix * ctm
for the general case.)

> And what about non-equale scale value, i.e. your CTM is 200% vertical, but
> only 100% horizontal?

That results in stretched text, as expected.

> Fonts (or rather text extents for a given text and a given font) do scale
> nonlinear, which I think may lead to some nasty surprises in regards to
> (render a text at 100% scale and at 200% and you get nonlinear run-lengths
> i.e. the text at 200% may less than double the width than the text at
> 100%)

You can turn metric hinting off to get a device-independent layout.

> Regards
> Dirk
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo

"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
        -- Dan Bern, "New American Language"

More information about the cairo mailing list