W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2011

[whatwg] Remove maxWidth from fillText and strokeText

From: Charles Pritchard <chuck@jumis.com>
Date: Sun, 13 Feb 2011 12:30:07 -0800
Message-ID: <4D583F4F.9090501@jumis.com>
Could we remove the optional maxWidth parameter from fillText and 
strokeText of CanvasRenderingContext2D.
I don't see them in use anywhere, they're not widely implemented, and I 
don't see them fitting any particular common purpose.

fillText("this very long strong", maxWidth) does not ensure any kind of 
readability of the text.

Authors can use measureText to achieve the same effect, with more 
flexibility and better exposure to the actual size
of the font that will be used. They can use clip() if they need to 
ensure glyphs stay within a bounding box (something
which maxWidth does not provide, despite its intent.



-Charles
Received on Sunday, 13 February 2011 12:30:07 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:30 UTC