[cairo] Re: Cairo font size should be in units
Bill Spitzak
spitzak at d2.com
Wed Sep 29 20:21:44 PDT 2004
On Wednesday 29 September 2004 01:22 pm, graydon hoare wrote:
> if this is true, all the better: the question vanishes. I was,
> I must admit, working mostly off of the combination of this page:
>
> http://freetype.sourceforge.net/freetype2/docs/glyphs/glyphs-3.html
>
> which suggests that leading lies outside the EM square, and this
> page:
>
> http://freetype.sourceforge.net/freetype2/docs/glyphs/glyphs-2.html
>
> which suggests that it is the EM square alone (minus leading) to which
> a font point size or pixel size applies. this interpretation appears
> again in the freetype API documentation, but perhaps he has his leadings
> confused (or perhaps no modern fonts even talk about additional leading,
> so it's a moot point).
Most fonts seem to be designed so that 1 EM is a *minimal* line spacing.
Almost all typesetting adds some extra "leading" to space the lines out
further.
So this is not in conflict. "leading" is outside the EM square. If it is zero
you get very closely-packed lines.
My recommendation is that the fonts be selected with a 2x2 matrix where an em
square exactly fills a 1x1 square transformed by this matrix to user space.
If the matrix is [x 0 0 x] then 1 em is x units tall and minimum line spacing
is x, but most programs will space lines at x+leading.
More information about the cairo
mailing list