<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>10926</bug_id>
          
          <creation_ts>2010-10-01 00:44:48 +0000</creation_ts>
          <short_desc>fillText or strokeText behavior needs to preserve readability of text when using maxWidth</short_desc>
          <delta_ts>2010-10-05 12:58:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>pre-LC1 HTML Canvas 2D Context (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jatinder Mann [MSFT]">jmann</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>40351</commentid>
    <comment_count>0</comment_count>
    <who name="Jatinder Mann [MSFT]">jmann</who>
    <bug_when>2010-10-01 00:44:48 +0000</bug_when>
    <thetext>Section 11 Text of the spec states:

&quot;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.&quot;

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 = &apos;1000px Arial&apos;;
ctx.fillText(&quot;HTML5 Canvas 2D Context&quot;, 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:

&quot;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.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40395</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2010-10-01 07:41:27 +0000</bug_when>
    <thetext>Isn&apos;t changing the font size the same as using a smaller font?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40580</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2010-10-04 23:09:06 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: The spec currently allows either condensing or shrinking the text (or both, actually). I don&apos;t see why requiring that the text only be shrunk would be better. In fact, it seems like it would be worse -- in edge cases, it looks better just to condense the font than to shrink it. This is a quality of implementation issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>