[whatwg] Text support in <canvas>

On 11/3/05, James Graham <jg307 at cam.ac.uk> wrote:
> Allowing text in <canvas> has serious accessibility problems. Presumably
> such text would not be resizable and encouraging authors to use
> non-resizable text in their web-apps is not a good idea. I guess there
> would also be (separate) issues with fonts; one assumes font
> substitution on a bitmap drawing would be more problematic than font
> substitution where the text is the main content.

There are accessibility problems for sure; however, accessibility is
not something that can be forced onto content authors.  They have to
design for accessibility, it won't happen for them.  If they don't,
being able to draw text into canvas is a relatively minor issue.

If a DOM or if arbitrary high-resolution scaling of already drawn
content is desired, SVG's the best option.  However, there are a lot
of use cases where text in <canvas> is highly desirable.  <canvas> is
already going down a pseudo-CSS path for specifying colors and other
styles; I think it makes sense to extend text in a similar way,
perhaps by using a textStyle that refers to a CSS property (by ID? by
class? somehow), and then letting you render text strings into the
canvas.

I know Ian's busy, so I might send an early suggested spec over to him
for polishing.

    - Vlad

Received on Tuesday, 8 November 2005 14:31:07 UTC