[cairo-bugs] [Bug 10067] quartz surface does not use device glyph extents

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Feb 26 03:36:43 PST 2007


http://bugs.freedesktop.org/show_bug.cgi?id=10067





------- Comment #1 from Brian.Ewins at gmail.com  2007-02-26 03:36 -------
This patch unfortunately makes use of the 'slow' glyph calculations (using the
glyph path information) inevitable, when the only thing we need here is the
device advance (from ATSUGlyphGetScreenMetrics). Although, in fact we take the
slow path for every glyph right now anyway because of cairo-scaled-font.c:1449
- "info |= CAIRO_SCALED_GLYPH_INFO_METRICS;" (on the info that is requested
when we init a scaled glyph). The options for making this faster are:

- expose enough information about the transforms involved that the advances can
be recovered from the glyph x, y coordinates (thats the approach taken in bug
9568, and it's not pretty)
- expose enough information from the atsui scaled font that
ATSUGlyphGetScreenMetrics can be called here. This bypasses the glyph cache.
- add eg CAIRO_SCALED_GLYPH_INFO_ADVANCES as an option to
_cairo_scaled_glyph_lookup, for glyph info that doesn't need the paths; the
quartz code should still be pretty much the same as above, and there should be
no impact on other font backends; just some small changes to cairo-scaled-font
and cairo-atsui-font.

The third option looks the best to me, I'll try to get some perf results for
comparison.

I have to wonder if there is a similar fast/slow path issue with FT, since the
advances are stored in the font, while the inked extents must be calculated
from the glyph outlines at some point.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the cairo-bugs mailing list