[cairo] scale with text

Tobias Ceglarek dev at ceglarek.eu
Fri Feb 23 10:14:21 PST 2007

> > 1. Turn off the hinting
> > 
> >    You can do this with cairo_font_options_set_hint_style and
> >    cairo_font_options_set_hint_metrics. See the example I attached
> >    below for details. (And note that I also explicitly set
> >    ANTIALIAS_GRAY since you really don't want ANTIALIAS_SUBPIXEL
> >    without hinting).
> > 
> >    This is the right answer if you want to be able to scale without
> >    any change in shape, (for example, if you're animating a zoom with
> >    text, the changes in shape and position can be very
> >    undesirable). But, without hinting, text can also be much less
> >    legible, so it's not necessarily always the right thing.
> For me this is the best/quickest solution. Thank you very very much for
> your help!!!


I have detect a difficulty. Yet I have testet my scenario with pygtk: a
drawingarea in a window.

Now I have inserted the drawingarea in a viewport, the viewport in a
scrolledwindow, the scrolledwindow in a vbox an the vbox in the window.

suddenly the settings

set_hint_style (cairo.HINT_STYLE_NONE)
set_hint_metrics (cairo.HINT_METRICS_OFF)
fopt.set_antialias (cairo.ANTIALIAS_GRAY)

seem to be overwritten. My problem is present again.

More information about the cairo mailing list