Re: A property for font antialiasing control on Mac OS X

On Wednesday 2013-07-17 19:39 -0700, Rik Cabanier wrote:
> On Wed, Jul 17, 2013 at 5:58 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.
> >
> 
> It depends how you do subpixel AA. I agree that in most cases you won't be
> able to tell the difference.
> 
> 
> >
> > > - content that will end up in a 3d transform
> >
> > Implementations already know how to disable subpixel AA here;
> > authors don't need to give hints.
> >
> 
> I think you misunderstood.
> What I meant is that if you have text that *is going to be *animated,
> transitioned or will have a 3d transform applied to it, you want to disable
> subpixel positioning. Otherwise you will notice a change in rendering when
> it is animated.

Are you talking about subpixel positioning or subpixel AA?

If subpixel AA doesn't lead to a drastic change in apparent
boldness, it's not a problem if the implementation switches at the
beginning and end of an animation.  The text is a little easier to
read when it's not moving due to the subpixel AA -- but then again,
text is expected to be easier to read when it's not moving because
it's not moving.

> Other cases where an author might want this, is if the element that
> contains the text:
> - becomes transparent
> - has a filter applied to it
> - has blending applied to it

Again, with a better implementation of subpixel AA, the other
changes (filters, opacity, etc.) should make the change in AA less
noticeable.

> > > - match canvas text
> > > Text in canvas never uses subpixel-AA (although there are some browsers
> > > that allow it) and an author might want to match HTML text with Canvas
> > text
> >
> > I don't think this is a strong use case.
> >
> 
> Unsure. How about text in an SVG image?

That would use subpixel AA.

> > > Maybe for background-clip you might want the text to be a hard clip and
> > not
> > > antialiased?
> >
> > I don't think antialiasing of text will ever cause it to extend
> > outside a clip that it's in.
> >
> 
> Doesn't background-clip use the text as a clipping path for the background
> image? If so, you might not want blurry edges

There's a WebKit-specific feature for that.  But if you're using
text as a clipping path, I wouldn't expect subpixel AA of the
clipping path.

-David

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

Received on Thursday, 18 July 2013 04:29:38 UTC