Re: [whatwg] Enabling LCD Text in 2D canvases.

On Wed, Nov 14, 2012 at 8:09 AM, Justin Novosad <junov@chromium.org> wrote:

> On top of that, subpixel antialiasing would have to get turned off if a
> rotation or scale (or any transform that breaks pixel alignment), is
> applied to the canvas element.
>

We don't do that. Anything we could about that would only be partially
effective since a transform could be applied after the canvas has been
drawn into.

That is an interesting solution but it is still not 100% safe from the
> author's perspective, since there are still several use cases that could
> cause artifacts (e.g. applying transforms post rasterization) Even with
> this feature, it still requires a lot of care to do everything right 100%
> of the time.  For example, suppose the page gets zoomed after the canvas
> contents were rendered.
>

Yes.

Given how 2d canvas currently works, I don't see any killer solution that
> would allow subpixel antialiased text without any caveats.
>

We could keep two copies of the canvas buffer: one rendered with subpixel
AA and one without, and use the latter for rendering if we think it might
be resampled. Of course, this isn't going to perform very well.

Are there precedents for exposing features with documented caveats?
> (excluding caveats that were discovered after the fact)
>

Yes, and many of them have been extremely problematic, because Web authors
will ignore the caveats. However, it can be acceptable as long as the bad
behavior is well-defined and implemented consistently across browsers.

Rob
-- 
Jesus called them together and said, “You know that the rulers of the
Gentiles lord it over them, and their high officials exercise authority
over them. Not so with you. Instead, whoever wants to become great among
you must be your servant, and whoever wants to be first must be your
slave — just
as the Son of Man did not come to be served, but to serve, and to give his
life as a ransom for many.” [Matthew 20:25-28]

Received on Wednesday, 14 November 2012 20:11:00 UTC