text-rendering property (was Re: A property for font antialiasing control on Mac OS X)

On Thursday 2013-07-18 07:18 -0700, Dirk Schulze wrote:
> On Jul 17, 2013, at 6:00 PM, "L. David Baron" <dbaron@dbaron.org> wrote:
> > On Wednesday 2013-07-17 17:04 -0700, Rik Cabanier wrote:
> >> Other cases where you might want to turn off anti-aliasing:
> >> - animations
> >> when animating text, you don't want to anti-alias because of performance
> >> and also because subpixel AA will cause "jiggling" of characters when you
> >> move a text run
> > 
> > The jiggling is a result of subpixel *positioning* of text (which
> > also requires re-rasterizing for the different subpixel positions,
> > which integer shifts don't).  I think that's independent of
> > antialiasing.
> 
> Right. And at least SVG has a CSS property to disable glyph
> alignment so that you don't see these jumps. The property is
> implemented in all browsers even though I forgot the name right
> now.

On Thursday 2013-07-18 07:31 -0700, Dirk Schulze wrote:
> The property I was speaking about is 'text-rendering'. If you use
> text-rendering: geometricPrecision you won't see the described
> problems.

I don't think either of:
http://www.w3.org/TR/2011/REC-SVG11-20110816/painting.html#TextRenderingProperty
http://www.w3.org/TR/2013/WD-SVG2-20130618/painting.html#TextRenderingProperty
comes anywhere close to saying that 'text-rendering:
geometricPrecision' disables subpixel positioning.  In fact, the
"comparable geometric precision to path data" seems to imply that
subpixel positioning *should* be used.

And I also don't think "implemented in all browsers" here means
"does what you want in all browsers", given how vague the definition
of the property is.  In Gecko, from a quick look at the code, it
looks like:
 * our SVG text implementation switches to no antialising for
   'optimizeSpeed'
 * on Windows XP and lower, we prefer GDI over Uniscribe for
   'optimizeSpeed', and for 'auto' when the font size is reasonably
   small

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Thursday, 18 July 2013 16:57:13 UTC