[cairo] Rotated glyph inked area problem
Ian Britten
britten at caris.com
Fri Sep 10 05:13:55 PDT 2010
On 09/09/10 08:40 PM, Behdad Esfahbod wrote:
>> For my first attempt to get the inked-area, I was using
>> cairo_glyph_extents(), but I seem to have run into something odd.
>> When getting the extent of a *rotated* glyph, the returned
>> width/height in the cairo_text_extents_t structure doesn't seem to
>> be the for the "inked area" (As documented).
>>
>> -> Is this a bug, or a documentation shortcoming?
>
> A bug. Not very easy to fix though.
Fair enough.
At a minimum, I'd suggest that a caveat be added to the docs,
mentioning that the results are only approximate for rotated
glyphs (And perhaps pointing people to
cairo_glyph_path()+cairo_fill_extents() instead).
>> -> Should cairo_glyph_extents() return *exactly* the same results
>> as cairo_glyph_path()+cairo_fill_extents()?
>
> Ideally, yes. In fact, my long term plan is for cairo to get the glyph
> outline from FreeType and do everything (rasterization, extent calculations,
> etc) all within cairo itself since FreeType has proved to be very
> low-precision at those.
Agreed. We've encountered similar problems before (Overflow, if I
recall...). The details are fuzzy at the moment, but I believe we
load fonts at a specific/fixed size, then do all the subsequent
scaling ourselves...
>> So, should I pursue either of these issues (Bugzilla?), or are
>> they known issues?
>
> Known issues. Here's what I wrote previously:
>
> http://lists.freedesktop.org/archives/cairo/2008-May/014146.html
Phew - That's a fair amount of stuff to try and fix! I assume
there's no estimate yet, eh? Best of luck!
I guess I'll use the cairo_glyph_path()+cairo_fill_extents()
approach for now, and maybe re-visit it in the future.
Thanks for the info!
Ian
More information about the cairo
mailing list