A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).

Text in Canvas: Difference between revisions

From WHATWG Wiki
Jump to navigation Jump to search
 
(13 intermediate revisions by 3 users not shown)
Line 12: Line 12:
''Explanation of why the current markup is insufficient.''
''Explanation of why the current markup is insufficient.''


* Image workaround destroys potential accessibility options
Possible workarounds and the associated problems are described in great detail at http://canvaspaint.org/blog/2006/12/rendering-text/
 
Executive Summary:
 
* Images are large and do not scale
* Vector fonts are large, too
 
Moreover, the workarounds make accessibility more difficult, and authors need to worry about font copyright, normally addressed by the users operating system vendor


=== Current Usage and Workarounds ===
=== Current Usage and Workarounds ===
Line 19: Line 26:
''Some evidence that this feature is desperately needed on the web.  You may provide a separate examples page for listing these.''
''Some evidence that this feature is desperately needed on the web.  You may provide a separate examples page for listing these.''


* http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-October/007363.html
* http://osteele.com/sources/javascript/docs/textcanvas
* http://canvaspaint.org/blog/2006/12/rendering-text/
* http://www.random.abrahamjoffe.com.au/public/JavaScripts/canvas/fontGenerator.htm
* http://minijoe.com/ota/emulator?sid=canvasoids
* http://minijoe.com/ota/emulator?sid=canvasout
* http://code.google.com/p/canvas-text/ A full implementation of the spec for any browser


=== Benefits ===
=== Benefits ===


''Explanation of how and why new markup would be useful.''
''Explanation of how and why new markup would be useful.''
The problems described in "Current Limitations" would disappear :)


=== Requests for this Feature ===
=== Requests for this Feature ===


* <cite>[http://example.com Source]</cite> <blockquote><p>I would like this feature ...</p></blockquote>
* http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-October/007363.html
* http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2006-June/006527.html


== Proposed Solutions ==
== Proposed Solutions ==
Line 33: Line 49:
=== My Solution ===
=== My Solution ===
:''Brief description of the solution and of how it address the problem at hand.''
:''Brief description of the solution and of how it address the problem at hand.''
see http://rhino-canvas.sourceforge.net/www/drawstring.html#api


==== Processing Model ====
==== Processing Model ====
Line 45: Line 64:
==== Adoption ====  
==== Adoption ====  
:''Reasons why page authors would use this solution.''
:''Reasons why page authors would use this solution.''
[[Category:Proposals]]

Latest revision as of 12:12, 26 January 2011

Currently, the Canvas API does not include the ability to draw text strings. That makes several potential Canvas applications, such as dynamic graphs or maps, more complex than necessary. Instead of using the text facilities of the platform, Canvas applications need to bundle their own vector fonts or use inaccessible pre-rendered images for text display. Thus, using Canvas it is unattractive for authors and users are forced to use a proprietary plugin (Flash) for some applications.


Use Case Description

  • Maps (Street names, ...)
  • All kinds of graphs needing labels
  • Games (High score, "Game Over" etc)


Current Limitations

Explanation of why the current markup is insufficient.

Possible workarounds and the associated problems are described in great detail at http://canvaspaint.org/blog/2006/12/rendering-text/

Executive Summary:

  • Images are large and do not scale
  • Vector fonts are large, too

Moreover, the workarounds make accessibility more difficult, and authors need to worry about font copyright, normally addressed by the users operating system vendor

Current Usage and Workarounds

Some evidence that this feature is desperately needed on the web. You may provide a separate examples page for listing these.

Benefits

Explanation of how and why new markup would be useful.


The problems described in "Current Limitations" would disappear :)

Requests for this Feature

Proposed Solutions

My Solution

Brief description of the solution and of how it address the problem at hand.

see http://rhino-canvas.sourceforge.net/www/drawstring.html#api


Processing Model

Explanation of the changes introduced by this solution. It explains how the document is processed, and how errors are handled. This should be very clear, including things such as event timing if the solution involves events, how to create graphs representing the data in the case of semantic proposals, etc.

Limitations

Cases not covered by this solution in relation to the problem description; other problems with this solution, if any.

Implementation

Description of how and why browser vendors would take advantage of this feature.

Adoption

Reasons why page authors would use this solution.