Re: Font-related question...
Behdad Esfahbod <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
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/ -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo