<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:fred.wang&#64;free.fr" title="Frédéric Wang (:fredw) &lt;fred.wang&#64;free.fr&gt;"> <span class="fn">Frédéric Wang (:fredw)</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Support arbitrary number of parts for GlyphAssembly"
   href="https://bugs.webkit.org/show_bug.cgi?id=130327">bug 130327</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;">CC</td>
           <td>
               &nbsp;
           </td>
           <td>alex&#64;igalia.com, bfulgham&#64;webkit.org
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Depends on</td>
           <td>
               &nbsp;
           </td>
           <td>155434
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Support arbitrary number of parts for GlyphAssembly"
   href="https://bugs.webkit.org/show_bug.cgi?id=130327#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Support arbitrary number of parts for GlyphAssembly"
   href="https://bugs.webkit.org/show_bug.cgi?id=130327">bug 130327</a>
              from <span class="vcard"><a class="email" href="mailto:fred.wang&#64;free.fr" title="Frédéric Wang (:fredw) &lt;fred.wang&#64;free.fr&gt;"> <span class="fn">Frédéric Wang (:fredw)</span></a>
</span></b>
        <pre>The number of repetition *for each* extender part was limited to 128 in <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Set an upper limit for the size or number of pieces of stretchy operators"
   href="show_bug.cgi?id=155434">bug 155434</a>.

If we support an arbitrary number of parts (thus extender parts) then the limit should instead be set on the number of glyphs *for the whole assembly*.

This blog post explains how to implement generic support for the GlyphAssembly sub-table and in particular to calculate (before painting) the number N of glyphs necessary (and so to set a limit N_max): <a href="http://frederic-wang.fr/opentype-math-in-harfbuzz.html">http://frederic-wang.fr/opentype-math-in-harfbuzz.html</a>

When the limit is exceeded, we currently just leave a big gap. In <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Set an upper limit for the size or number of pieces of stretchy operators"
   href="show_bug.cgi?id=155434#c6">bug 155434 comment 6</a> it was suggested to evenly distribute the gaps. I would instead suggest to just limit the number N of glyphs (and as a consequence to limit the stretch size) before painting them.

The blog post gives a reference to an implementation in progress for HarfBuzz. I think it makes sense to use the text drawing (MathOperator class) as well as MATH table parsing (OpenTypeMathData class) from such library. In particular for WebKit ports using HarfBuzz (such as GTK) we should probably consider reusing HarfBuzz's MATH support when ready.</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>