<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:mmaxfield&#64;apple.com" title="Myles C. Maxfield &lt;mmaxfield&#64;apple.com&gt;"> <span class="fn">Myles C. Maxfield</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED DUPLICATE - Text shadow sometimes clipped unexpectedly"
   href="https://bugs.webkit.org/show_bug.cgi?id=108929">bug 108929</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>DUPLICATE
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED DUPLICATE - Text shadow sometimes clipped unexpectedly"
   href="https://bugs.webkit.org/show_bug.cgi?id=108929#c18">Comment # 18</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED DUPLICATE - Text shadow sometimes clipped unexpectedly"
   href="https://bugs.webkit.org/show_bug.cgi?id=108929">bug 108929</a>
              from <span class="vcard"><a class="email" href="mailto:mmaxfield&#64;apple.com" title="Myles C. Maxfield &lt;mmaxfield&#64;apple.com&gt;"> <span class="fn">Myles C. Maxfield</span></a>
</span></b>
        <pre>This is because of a mismatch between CoreGraphics and CSS. In particular, CoreGraphics doesn't support drawing multiple shadows on text.

We work around that by drawing the text multiple times, one for each shadow. However, we want to make sure that the original text isn't also drawn multiple times, so we bump up the shadow offsets so the text and the shadow don't intersect, and then we clip out the original text (so only the shadow remains).

Unfortunately, this clipping requires knowing where the visual extent of the text is, which WebKit currently has trouble with. In particular, we often use layout extents in lieu of visual extents, which is a problem when the glyphs draw outside of their layout boxes. In this case, it causes us to think the text shadow is much smaller than it really is, so our clipping operation clips to an area which is too small.

A quick and dirty hack would be to inflate this clip rect by an arbitrary amount (and bump up the shadow offset accordingly). However, that doesn't actually solve the problem; it just makes the problem occur less often. The real solution is for WebKit to be properly educated about the difference between layout extents and visual extents, which is a fairly large task.

Therefore, I'd like to mark this as a dup of (an extremely old) <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - text repainting does not account for glyphs which draw outside the typographic bounds of the font"
   href="show_bug.cgi?id=6274">bug 6274</a>.

*** This bug has been marked as a duplicate of <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - text repainting does not account for glyphs which draw outside the typographic bounds of the font"
   href="show_bug.cgi?id=6274">bug 6274</a> ***</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>