[cairo] Font metrics problem?
Carl Worth
cworth at cworth.org
Tue Jan 11 11:49:45 PST 2005
On Wed, 06 Oct 2004 10:49:35 +1000, Richard Cole wrote:
> I'm having trouble making sense out of the font metrics I'm getting from
> Cairo. I appologise that the following code is in Ocaml.
The code for font metrics had some serious bugs. Just today Keith
Packard committed a big rework of this code. Please give it a try and
see if it doesn't behave any better for you.
> Are there any tests of the font metrics? I couldn't find any samples
> that draw a font metrics determined bounding box around the text.
There's an example in CVS in cairo-demo/png/text.c:
http://cvs.cairographics.org/cairo-demo/png/text.c?view=markup
And its output can be seen here:
http://cairographics.org/~cworth/images/text-new_extents.png
Oh, look at that. The extents definitely look much better, but now the
results of cairo_show_text are not matching cairo_text_path followed
by cairo_stroke. That's a new bug, as can be seen by comparing with
the old output (with the buggy extents):
http://cairographics.org/~cworth/images/text.png
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050111/abab8287/attachment.pgp
More information about the cairo
mailing list