[cairo] Font-related question...
Behdad Esfahbod
behdad at behdad.org
Thu Mar 21 13:33:24 PDT 2013
On 13-03-21 04:20 PM, Philip Schneider wrote:
> Greetings -
>
> The doc for cairo_scaled_font_create() suggests that the font_matrix can be
> used to set the point size N (by making the matrix contain a scale of N). But
> there's also cairo_set_font_size, which seems to act to replace the matrix one
> has set in the creation call. If my application makes use of the same face,
> but at say 3 font sizes (10, 16, 24), would it be better to create and retain
> three separate instances (each at one of the three desired sizes), or just
> create a single instance and use cairo_set_font_size() whenever I need to
> switch between sizes?
Normally you shouldn't need to use cairo_scaled_font_create(). Cairo does
that automatically for you. cairo_set_font_size() is a convenience wrapper
for cairo_set_font_matrix().
--
behdad
http://behdad.org/
More information about the cairo
mailing list