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

[whatwg] Text support in <canvas>

From: Vladimir Vukicevic <vladimirv@gmail.com>
Date: Tue, 8 Nov 2005 14:31:07 -0800
Message-ID: <9540d010511081431u1adababcw681b3d361c717943@mail.gmail.com>
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

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:24 UTC