[cairo] Problem with fonts

Behdad Esfahbod behdad at behdad.org
Wed Jul 19 12:20:40 PDT 2006


On Wed, 2006-07-19 at 05:36 -0400, Baptiste Gaillard wrote:
> Hello, i'm comparing different graphic libraries. To test the font
> drawing performances I draw 40000 times the same symbol in a buffer of
> 10000*10000 pixel. 
> I've encoutered problem to activate anti-alising, besides I don't
> understand how work the cairo_set_font_size function. When i'm using a
> 0.35 size It works but 
> with 0.50 cairo draws only a white point in the place of my glyph. 

And what exactly do you expect the font size 0.5 to do?  Typically you
want to use numbers like 12 and 24 there.  Seems like it's a bug that it
works with 0.35 :).

> I save the result in a PNG file, a zoom with IrfanView shows me that
> anti-alising is off (but i've activated that with cairo_set_antialias
> (cr,CAIRO_ANTIALIAS_DEFAULT !). 

There's no point in setting it to CAIRO_ANTIALIAS_DEFAULT as that's the
default!  If you really want to make sure it's activated, set it to
CAIRO_ANTIALIAS_GRAY for example.

behdad

> So, how can I activate anti-aliasing ? 
 
>  
> Thanks.
> Baptiste Gaillard
>  
>  
> Please consult the files attached to this mail to see the result. The
> first show a gliphs rendered with the code written in this mail, the
> second is a screenshot of the same thing with a 0.50 size.
>  
>  
> PS: sorry if it's difficult to understand me, i'm french ;-)
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo
-- 
behdad
http://behdad.org/

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



More information about the cairo mailing list