W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2012

[whatwg] Enabling LCD Text in 2D canvases.

From: Justin Novosad <junov@chromium.org>
Date: Mon, 12 Nov 2012 17:36:14 -0500
Message-ID: <CABpaAqSg6kg=Mhw+=M9vu5evo7f7WTq-O2iToGf1itYfxkAa2w@mail.gmail.com>
To: whatwg <whatwg@lists.whatwg.org>
Greetings,

Looking at the discussion archives, I saw that there have been proposals in
the past for exposing anti-aliasing related features to the 2D canvas
rendering context.  I realize these proposals met significant opposition
each time. Nonetheless, I would like to quickly re-open the discussion
because I feel there is a lot at stake for the web platform.  How about a
2d canvas rendering context attribute for controlling text anti-aliasing,
which could be used to enable LCD text filtering?

The main motivation is to make web apps better.  For many types of apps,
DOM-based rendering is uncompetitively slow (e.g. rendering a large number
of independently positioned text labels). On the other hand, 2D canvas can
deliver significantly better performance in many cases, but there is a
degradation in visual quality due to the lack of LCD text filtering.
 Current browsers don't enable LCD text in 2D canvas to prevent rendering
artifacts.  If LCD text were enable-able, authors would have to be mindful
of a number of caveats in order to avoid rendering artifacts. For example,
artifacts could result from certain use cases of canvas compositing,
transforms on the canvas element, canvas-to-canvas copying with drawImage
with a transform applied.  These are the same caveats native app developers
must face when using LCD text filtering.

Any thoughts?
Received on Monday, 12 November 2012 22:37:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:11 GMT