[cairo] Equivalence of text_path(); fill(); and show_text()
Behdad Esfahbod
behdad at behdad.org
Mon Oct 1 11:30:27 PDT 2007
On Thu, 2007-09-27 at 11:23 -0400, Carl Worth wrote:
> On Thu, 27 Sep 2007 15:54:25 +0100, Chris Wilson wrote:
> > It is my understanding that
> > cairo_show_text (cr, "cairo");
> > and
> > cairo_text_path (cr, "cairo");
> > cairo_fill (cr);
> > should generate identical output.
>
> Not precisely identical, no---just roughly the same.
>
> What happens in the text_path;fill case should be pretty
> straightforward, (cairo fills the path). But in the show_text case
> there are the following differences (at least):
>
> * Freetype is used for rendering the glyphs, (this is something that
> we could easily imagine changing in the future---particularly if
> we get a new software polygon rasterizer that's as fast or faster
> than what freetype has).
>
> * Glyph images are cached and reused
There's another major difference, that is: subpixel rendering. You
cannot get the effect of subpixel show_text() with the path.
--
behdad
http://behdad.org/
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo
mailing list