[Bug 10926] New: fillText or strokeText behavior needs to preserve readability of text when using maxWidth

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

           Summary: fillText or strokeText behavior needs to preserve
                    readability of text when using maxWidth
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML Canvas 2D Context (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: jmann@microsoft.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


Section 11 Text of the spec states:

"5.If the maxWidth argument was specified and the hypothetical width of the
inline box in the hypothetical line box is greater than maxWidth CSS pixels,
then change font to have a more condensed font (if one is available or if a
reasonably readable one can be synthesized by applying a horizontal scale
factor to the font) or a smaller font, and return to the previous step."

Currently the way the spec is defined, readability of text is difficult in the
above situation. Further, the text “reasonably readable” is not very precise.
Consider the following code:

ctx.font = '1000px Arial';
ctx.fillText("HTML5 Canvas 2D Context", 0, 300, 450);

IE and Firefox follow the spec, and the text is quite unreadable. Chrome and
Safari do not implement maxWidth. Opera, however, renders the text at the font
size that will fit in the maxWidth without scaling.

Opera’s implementation here seems to make most sense – as it is readable. This
text should be updated like so:

"5.If the maxWidth argument was specified and the hypothetical width of the
inline box in the hypothetical line box is greater than maxWidth CSS pixels,
then change font size to a size that will fit in the maxWidth width without
scaling the font, and return to the previous step."

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

Received on Friday, 1 October 2010 00:44:50 UTC