[cairo] Re: Cairo font size should be in units

Owen Taylor otaylor at redhat.com
Wed Sep 29 12:16:43 PDT 2004

On Tue, 2004-09-28 at 18:49 -0700, Bill Spitzak wrote:
> On Tuesday 28 September 2004 06:25 pm, graydon hoare wrote:
> > well, no, actually that's not true; cairo builds its CTM in terms of
> > physics. when you start up a cairo program, you have no reason to believe
> > that 1 user unit == 1 pixel. if you want that to be true, the first thing
> > you need to do is ask about DPI and reverse the physics-based
> > transformation. cairo's supposed to support writing
> > (semi)resolution-independent clients, after all.

I consider this a misfeature of Cairo:

 - Pixels matter at screen resolutions
 - People who work in pixel coordinates should have an easily accessible
   "base length" - something other than reverse-engineering the 
   CTM of the default transformation.

So, as much as I can hide this in the GTK+ wrappers (by overriding
the default transformation), I will.

Of course, for a printer, pixels aren't relevant.

> I should have not used the word "pixels". I meant user units.
> My main complaint is that I see no reason to request fonts using different 
> units than are used to request paths or line thicknesses.

So, say I have a 100dpi screen that I sit 3 feet from and like 12-pixel
fonts and 1-pixel lines. You sit at the same distance from your 150dpi
monitor. and like 18-pixel fonts. Do you want 1.5 pixel lines? 

I think it's coherent to say (as you did earlier) that we always use 
a fixed conversion factor between specified font size and user space
coordinates. But I don't think this gets you "resolution independent"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20040929/be489fc6/attachment.pgp

More information about the cairo mailing list