[Bug 11657] My worry is that this doesn't cover all the different kinds of textual transformations. Yes, it does cover obliqueness and weight, it does not cover letter spacing and other textual attributes that may be of some use to developers.

http://www.w3.org/Bugs/Public/show_bug.cgi?id=11657

Tab Atkins Jr. <jackalmage@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jackalmage@gmail.com

--- Comment #2 from Tab Atkins Jr. <jackalmage@gmail.com> 2011-01-10 18:26:26 UTC ---
(In reply to comment #1)
> It seems to me that a reasonable solution to this is to allow the rendering of
> an arbitrary HTML element to the canvas.  I don't think you want to duplicate
> all of CSS's text functionality in the canvas 2D context itself.  You probably
> want to allow some size to be passed in when doing this (so that text could
> wrap), too.
> 
> And it would be pretty handy if you could also just pass in a string to be
> parsed:
> 
>   var ctx = ...;
>   ctx.drawHTML("<span style='letter-spacing: -0.1; font-weight: 100'>Well
> <i>hello</i> there!", 100, 100, 500);
> 
> where the (100, 100) is the top-left corner of the area in which to lay out the
> CSS boxes, and 500 is the width.

You'd need a height as well (though a value that means 'auto' would be useful
for both).  Don't forget about vertical languages.  ^_^

Anyway, +1 on an idea in this direction.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 10 January 2011 18:26:28 UTC