<?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>174031</bug_id>
          
          <creation_ts>2017-06-30 11:12:29 -0700</creation_ts>
          <short_desc>Safari always assumes mono-spaced square characters when loading fonts</short_desc>
          <delta_ts>2017-07-05 18:09:22 -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>CSS</component>
          <version>Safari 10</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dima Voytenko">dvoytenko</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>mmaxfield</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1324471</commentid>
    <comment_count>0</comment_count>
    <who name="Dima Voytenko">dvoytenko</who>
    <bug_when>2017-06-30 11:12:29 -0700</bug_when>
    <thetext>See example: http://output.jsbin.com/jexixam/quiet

Initially, before the &quot;Slow&quot; font-face has been loaded or timed out, the sample text takes about 2.5-3x more space to layout (on iOS, it takes about 8-9 lines and once the font is loaded/timed out, it takes only 3 lines). In other words, the estimate is too rough.

It appears that Safari assumes mono-wide square characters, which is very uncommon. It might be a better option to use a fallback font to estimate character layout before the desired font is loaded (as in `font-family: Slow, Arial` where &quot;Arial&quot; is already available as the fallback). This would also reduce the work the browser has to do in case of timeout.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1324500</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-06-30 13:17:35 -0700</bug_when>
    <thetext>&lt;rdar://problem/33083545&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1325787</commentid>
    <comment_count>2</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2017-07-05 14:57:00 -0700</bug_when>
    <thetext>I think I fixed this in r216944. Can you see if the problem still reproduces on a nightly build?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1325854</commentid>
    <comment_count>3</comment_count>
    <who name="Dima Voytenko">dvoytenko</who>
    <bug_when>2017-07-05 18:09:22 -0700</bug_when>
    <thetext>Does appear to be fixed in nightly. Thanks for the fix!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>