W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2013

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

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 14 Mar 2013 09:18:24 +1300
Message-ID: <CAOp6jLazE_uvLn--+pw-pgGV_Gyu22xAvnimd098yu77m9Zhpw@mail.gmail.com>
To: Gregg Tavares <gman@google.com>
Cc: Stephen White <senorblanco@chromium.org>, WHAT Working Group <whatwg@whatwg.org>, Ian Hickson <ian@hixie.ch>, Rik Cabanier <cabanier@gmail.com>
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 GMT

This archive was generated by hypermail 2.3.1 : Wednesday, 13 March 2013 20:18:51 GMT