Re: [whatwg] Enabling LCD Text and antialiasing in canvas

On Thu, Mar 14, 2013 at 8:04 AM, Gregg Tavares <gman@google.com> wrote:

> It seems like an opaque canvas should be an orthogonal issue to
> subpixel-aa. Subpixel AA seems like it should be a Canvas2DRenderingContext
> setting though maybe with a name like
>
>    ctx.antialiasingRenderQuality =
>
> With options of
>
>    none
>    grayscale
>    bestForDeviceIfAxisAlignedAndNotScaledOrBlended
>

Ugh!


> This would let the developer choose. It would be clear what the limits
> are, when to use it, and would let the developer choose what they need,
> even in an opaque canvas.
>

Then we would need to come up with a spec for what happens when you
composite subpixel AA over non-opaque pixels, including how the per-channel
alpha values are combined to form a single alpha value. IIRC in some cases
(D2D) you just can't do it.

If we said that in a non-opaque canvas, subpixel AA is treated as
grayscale, that would be OK.

Rob
-- 
Wrfhf pnyyrq gurz gbtrgure naq fnvq, “Lbh xabj gung gur ehyref bs gur
Tragvyrf ybeq vg bire gurz, naq gurve uvtu bssvpvnyf rkrepvfr nhgubevgl
bire gurz. Abg fb jvgu lbh. Vafgrnq, jubrire jnagf gb orpbzr terng nzbat
lbh zhfg or lbhe freinag, naq jubrire jnagf gb or svefg zhfg or lbhe fynir
— whfg nf gur Fba bs Zna qvq abg pbzr gb or freirq, ohg gb freir, naq gb
tvir uvf yvsr nf n enafbz sbe znal.” [Znggurj 20:25-28]

Received on Wednesday, 13 March 2013 20:18:50 UTC