<?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>147976</bug_id>
          
          <creation_ts>2015-08-13 08:07:32 -0700</creation_ts>
          <short_desc>initial-letter fails to exclude text around glyph bounding box</short_desc>
          <delta_ts>2022-07-24 13:47:51 -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>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.9</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</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="Dave Cramer">dauwhe</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>eoconnor</cc>
    
    <cc>hyatt</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1117220</commentid>
    <comment_count>0</comment_count>
      <attachid>258888</attachid>
    <who name="Dave Cramer">dauwhe</who>
    <bug_when>2015-08-13 08:07:32 -0700</bug_when>
    <thetext>Created attachment 258888
HTML file showing crash between italic initial letter and subsequent text.

If an initial letter is created using a glyph that extends beyond the em box, the initial letter may overlap document text. The spec says, &quot;Text is therefore excluded around the glyph bounding boxes of the initial letters.&quot; [1] 

Testing with an italic initial letter can sometimes show this problem (test file attached). Some fonts (especially script fonts like Zapfino which may have negative side bearing) are also good test candidates. 

Dave

[1] https://drafts.csswg.org/css-inline/#initial-letter-exclusions</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1129335</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2015-09-29 12:22:37 -0700</bug_when>
    <thetext>&lt;rdar://problem/22901550&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886379</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-24 11:20:39 -0700</bug_when>
    <thetext>If from above attached test case, I remove -webkit- then all browsers behave same but if I keep -webkit- then &quot;J&quot; initial letter is big italic and remaining characters &apos;udge&apos; touches &quot;J&quot;.

-webkit- removed JSFiddle - https://jsfiddle.net/5wsq6han/show/

I followed MDN article and also changed the size in fraction from 5 to 5.0 and then also added back -webkit-:

Link - https://jsfiddle.net/ohcuv580/show

But Safari and all other browser still differ, other browser don&apos;t support &quot;initial-letter&quot; as per - https://developer.mozilla.org/en-US/docs/Web/CSS/initial-letter

We are trying to aligning with any web-spec? Since other browsers don&apos;t even support it. Just wanted to to share update. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1886404</commentid>
    <comment_count>3</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-07-24 13:47:51 -0700</bug_when>
    <thetext>I think this is config changed given the unprefixed version behaves correctly with other browsers.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>258888</attachid>
            <date>2015-08-13 08:07:32 -0700</date>
            <delta_ts>2015-08-13 08:07:32 -0700</delta_ts>
            <desc>HTML file showing crash between italic initial letter and subsequent text.</desc>
            <filename>inital-letter-exclude-around-glyph.html</filename>
            <type>text/html</type>
            <size>594</size>
            <attacher name="Dave Cramer">dauwhe</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KPGhlYWQ+Cgk8bWV0YSBjaGFyc2V0PSJ1
dGYtOCIgLz4KCTx0aXRsZT5leGNsdWRlIGFyb3VuZCBnbHlwaCBib3VuZGluZyBib3g8L3RpdGxl
Pgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgpwOjpmaXJzdC1sZXR0ZXIgewotd2Via2l0LWluaXRp
YWwtbGV0dGVyOiA1Owpmb250LXN0eWxlOiBpdGFsaWM7Cn0KPC9zdHlsZT4KPC9oZWFkPgo8Ym9k
eT4KPHA+SnVkZ2UsIHRoZW4sIHRvIHdoYXQgcGl0Y2hlcyBvZiBpbmZsYW1lZCwgZGlzdHJhY3Rl
ZCBmdXJ5IHRoZSBtaW5kcyBvZiBoaXMgbW9yZSBkZXNwZXJhdGUgaHVudGVycyB3ZXJlIGltcGVs
bGVkLCB3aGVuIGFtaWQgdGhlIGNoaXBzIG9mIGNoZXdlZCBib2F0cywgYW5kIHRoZSBzaW5raW5n
IGxpbWJzIG9mIHRvcm4gY29tcmFkZXMsIHRoZXkgc3dhbSBvdXQgb2YgdGhlIHdoaXRlIGN1cmRz
IG9mIHRoZSB3aGFsZeKAmXMgZGlyZWZ1bCB3cmF0aCBpbnRvIHRoZSBzZXJlbmUsIGV4YXNwZXJh
dGluZyBzdW5saWdodCwgdGhhdCBzbWlsZWQgb24sIGFzIGlmIGF0IGEgYmlydGggb3IgYSBicmlk
YWwuPC9wPgo8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>