[cairo] cairo_device_font_t

Keith Packard keithp at keithp.com
Thu Jan 13 16:02:54 PST 2005


Around 16 o'clock on Jan 13, Owen Taylor wrote:

>  - With this API, it's not clear that cairo_font_t is useful ...
>    simple apps will use the toy API cairo_select_font() and 
>    cairo_scale_font(). Pango and equivalents will use 
>    cairo_device_font_t.  Perhaps we should just drop 
>    cairo_font_t from the public API.

I suggest we call this new object a 'cairo_font_t'.  If an 'unscaled' font 
object becomes useful later, we can call that a 'cairo_unscaled_font_t' or 
'cairo_abstract_font_t'.  

This seems consistent with other font using APIs like Windows, X and even
Xft where a 'font' object is a particular face under a particular
transformation.

> - Do we need a function to get the cairo_font_scale_t for a 
>   cairo context? Do we need to expose the logic in 
>   _cairo_matrix_compute_scale_factors() for selecting a  point size
>   from a font scale?

We surely need to expose the combined transform, and having applications 
use the same scale factor computation would reduce errors.  I believe this 
API should expose a non-transforming (i.e. 2x2) matrix.  Should we expose 
the matrix and the compute_scale_factors convenience function?  Or should 
we expose a compound object holding both scale factors and the remaining 
area-preserving transform?

-keith


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050113/420779da/attachment.pgp


More information about the cairo mailing list