[cairo] working with font dimensions

Petr Danecek petr.danecek at gmail.com
Wed Jun 1 08:36:01 PDT 2011


I'd like to render glyphs of different heights very accurately. So far I
was not very successful with this. Could anyone recommend a better way
to do this? In the example below, I'd like the glyphs to be of a
particular with and height. I would also like to know how many pixels
were actually used. Any ideas?

Best regards,

my $matrix = Cairo::Matrix->init_scale($glyph_width,$glyph_height);
my $extents = $cr->text_extents($text);

More information about the cairo mailing list