[whatwg] Enabling LCD Text in 2D canvases.
junov at chromium.org
Thu Nov 15 06:26:06 PST 2012
On Wed, Nov 14, 2012 at 8:07 PM, Fred Andrews <fredandw at live.com> wrote:
> The canvas that scripts draw into could be over-sized with the UA down
> sampling this to
> fit the target size and taking into account the sub-pixel screen layout
> when doing so.
Obviously, that would be costly (x3 pixels), but I think it is a very
realistic solution and relatively low hanging fruit. The over-sizing of the
canvas would have to be handled under the hood by the UA though, because it
depends on LCD component ordering and orientation, which means querying the
OS/display driver. A lot of the kinks with the over-sized canvas approach
have already been ironed out for solving the problem of High-DPI support (
put/getImageDataHD ), and I like the idea of unifying the two. Implementing
this would mostly be a matter of adding per color component compositing of
canvases. Also, the pixel aspect ratio would have to be taken into account
for line drawing.
Regarding the concerns about accessibility, I think the problem can be
solved by using HitRegions with labels. Come to think of it, there should
be an option to make the UA do this automatically: create a HitRegion with
a label every time text is drawn to a canvas.
More information about the whatwg