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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>41599</bug_id>
          
          <creation_ts>2010-07-05 03:08:55 -0700</creation_ts>
          <short_desc>optimizeLegibility doesn&apos;t play nice with fonts that do not have a space glyph</short_desc>
          <delta_ts>2010-07-06 01:47:07 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.6</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>0</everconfirmed>
          <reporter>maarten.vancoile</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>eric</cc>
    
    <cc>mitz</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>246552</commentid>
    <comment_count>0</comment_count>
    <who name="">maarten.vancoile</who>
    <bug_when>2010-07-05 03:08:55 -0700</bug_when>
    <thetext>when using &quot;text-rendering: optimizeLegibility;&quot; on a site with @font-face, webkit tends to clip-off part of the text.

Example:
http://www.fontsquirrel.com/fontfacedemo/Alpha-Echo
+ css:
html { text-rendering: optimizeLegibility; }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>246679</commentid>
    <comment_count>1</comment_count>
    <who name="">mitz</who>
    <bug_when>2010-07-05 09:20:57 -0700</bug_when>
    <thetext>The problem appears to be this:

ERROR: Font maps SPACE and ZERO WIDTH SPACE to the same glyph. Glyph width will not be overridden.
(WebCore/platform/graphics/SimpleFontData.cpp:164 void WebCore::SimpleFontData::platformGlyphInit())</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>246689</commentid>
    <comment_count>2</comment_count>
    <who name="">mitz</who>
    <bug_when>2010-07-05 09:43:04 -0700</bug_when>
    <thetext>Further debugging shows that the problem is that the font doesn’t map the SPACE character to a glyph. WebKit substitutes the space glyph from the next font in fallback order, but in some code paths, WebKit uses the cached space width from the font itself, which is bogus. This discrepancy is what’s causing the incorrect line breaking.

Specifically, in RenderBlock::findNextLineBreak(), the initialization of wordTrailingSpaceWidth should probably be changed to measure a space character instead of using the cached space width.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>246708</commentid>
    <comment_count>3</comment_count>
      <attachid>60554</attachid>
    <who name="">mitz</who>
    <bug_when>2010-07-05 10:35:44 -0700</bug_when>
    <thetext>Created attachment 60554
Account for font fallback in initializing wordTrailingSpaceWidth</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>246809</commentid>
    <comment_count>4</comment_count>
    <who name="">mitz</who>
    <bug_when>2010-07-05 17:11:46 -0700</bug_when>
    <thetext>Fixed in &lt;http://trac.webkit.org/projects/webkit/changeset/62510&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>246945</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-07-06 01:47:07 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/62510 might have broken Leopard Intel Release (Tests)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>60554</attachid>
            <date>2010-07-05 10:35:44 -0700</date>
            <delta_ts>2010-07-05 15:52:43 -0700</delta_ts>
            <desc>Account for font fallback in initializing wordTrailingSpaceWidth</desc>
            <filename>41599_r1.diff</filename>
            <type>text/plain</type>
            <size>1776</size>
            <attacher>mitz</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA2MjQ5MykKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTggQEAKKzIwMTAtMDctMDUgIERhbiBCZXJuc3RlaW4gIDxtaXR6QGFwcGxlLmNv
bT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBvcHRp
bWl6ZUxlZ2liaWxpdHkgZG9lc24ndCBwbGF5IG5pY2Ugd2l0aCBmb250cyB0aGF0IGRvIG5vdCBo
YXZlIGEgc3BhY2UgZ2x5cGgKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19i
dWcuY2dpP2lkPTQxNTk5CisKKyAgICAgICAgTm8gdGVzdCBiZWNhdXNlIG5vbmUgb2YgdGhlIGZv
bnRzIGF2YWlsYWJsZSB0byBEdW1wUmVuZGVyVHJlZSBhcmUgbWlzc2luZyBhIHNwYWNlIGdseXBo
LgorCisgICAgICAgICogcmVuZGVyaW5nL1JlbmRlckJsb2NrTGluZUxheW91dC5jcHA6CisgICAg
ICAgIChXZWJDb3JlOjpSZW5kZXJCbG9jazo6ZmluZE5leHRMaW5lQnJlYWspOiBXaGVuIHRoZSBm
b250IGRvZXMgbm90IG1hcCB0aGUgc3BhY2UgY2hhcmFjdGVyCisgICAgICAgIHRvIGEgZ2x5cGgs
IGEgZmFsbGJhY2sgZm9udCBpcyB1c2VkIGZvciBzcGFjZS4gVGhlcmVmb3JlLCB3b3JkVHJhaWxp
bmdTcGFjZVdpZHRoIG11c3QgYmUKKyA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WR0aCA9IGYudHlwZXNldHRp
bmdGZWF0dXJlcygpICYgS2VybmluZyA/IGYud2lkdGgoVGV4dFJ1bigmc3BhY2UsIDEpKSArIHdv
cmRTcGFjaW5nIDogMDsKIAogICAgICAgICAgICAgaW50IHdyYXBXID0gdG1wVyArIGlubGluZVdp
ZHRoKG8sICFhcHBsaWVkU3RhcnRXaWR0aCwgdHJ1ZSk7CiAgICAgICAgICAgICBpbnQgY2hhcldp
ZHRoID0gMDsK
</data>
<flag name="review"
          id="48118"
          type_id="1"
          status="+"
          setter="sam"
    />
          </attachment>
      

    </bug>

</bugzilla>