[cairo] Re: Cairo font size should be in units
Robert O'Callahan
robert at ocallahan.org
Wed Oct 6 09:08:23 PDT 2004
Owen Taylor wrote:
>On Wed, 2004-09-29 at 15:46 -0400, Carl Worth wrote:
>>/ On Wed, 29 Sep 2004 15:16:43 -0400, Owen Taylor wrote:
>/>/ > 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:
>/>/
>/>/ I should point out that Graydon's description of the default CTM in
>/>/ cairo is missing one important aspect. For display-devices[*], the
>/>/ default CTM is computed by computing 1 unit == 1/96 inch, and then
>/>/ rounding that to the nearest pixel size.
>/
>I think I've characterized this in previous mail as a nasty suprise
>awaiting developers as soon as the first user's screen goes above
>the threshold for 2-pixels-per-unit.
>
For the record, what Carl said is exactly what we want for Mozilla.
There's an extended discussion of units issues, some of which are
Mozilla-specific, here:
http://www.ocallahan.org/mozilla/units.html
Rob
--
Robert O'Callahan <robert at ocallahan.org>
"In the beginning was the Word, and the Word was with God, and the Word
was God. ... The Word became flesh and made his dwelling among us. We
have seen his glory, the glory of the One and Only, who came from the
Father, full of grace and truth." 1 John 1:1,14
More information about the cairo
mailing list