[cairo] Rounding bug in cairo_ft_font.c
Keith Packard
keithp at keithp.com
Sun Jan 9 13:49:25 PST 2005
Around 0 o'clock on Jan 9, Carl Worth wrote:
> There are obviously some bugs in the exact metrics, (notice some of
> the glyphs extend beyond the boxes).
Most importantly, the metrics are obviously different under different CTM
environments. This can't be OK. Making that work was what I did in my
patch.
Note that the interface between the top and bottom of cairo is the source
of the current bugs; it has the font driver attempt to return things in
'user space', but there isn't any user space down there, only pixel space
and font space.
With my patch in place, CTM has no effect on metrics. And, I use the font
matrix to scale the font metrics; I think the only change here is that
Owen believes we should just use the font matrix to transform the font
metrics. I think I can do that; then we'll have a more reasonable
comparison.
> This seems quite sane to me. Do we actually want something different?
I don't know. PostScript returns just the font-space metrics and lets the
application sort out the font matrix effect on metrics. Owen (and I)
think that this is a bad plan. I think I agree with Owen that the only
sensible thing to do is return a user space axis-aligned bounding
rectangle that covers the glyphs. Optimizing this bounding rectangle to
minimally bound the glyphs seems optional.
-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/20050109/3357b76c/attachment.pgp
More information about the cairo
mailing list