Skip to content

Commit d2a3cff

Browse files
committed
Clarify layout of large operators algorithm
1 parent feb0caa commit d2a3cff

File tree

1 file changed

+56
-16
lines changed

1 file changed

+56
-16
lines changed

spec.html

+56-16
Original file line numberDiff line numberDiff line change
@@ -1942,7 +1942,7 @@ <h4>Layout of operators</h4>
19421942
<code>T<sub>ascent</sub></code> +
19431943
<code>T<sub>descent</sub></code>
19441944
and at position determined by the previous box metrics
1945-
shifted by Δ towards the <a>line-over</a>.
1945+
shifted by Δ towards the <a>line-under</a>.
19461946
</li>
19471947
</ol>
19481948
<figure id="figure-base-variants-and-assembly">
@@ -1961,25 +1961,65 @@ <h4>Layout of operators</h4>
19611961
then:
19621962
<ol>
19631963
<li>
1964-
<p>
1965-
Use the
1966-
<code>MathVariants</code>
1967-
table to try and find a glyph of height at least
1968-
<a>DisplayOperatorMinHeight</a>.
1969-
If none is found, fall back to the
1970-
largest non-base glyph. If none is found, fall back to
1971-
the layout algorithm of <a href="#layout-of-mtext"></a>.
1972-
</p>
1964+
If it is not possible to <a>shape a stretchy glyph</a>
1965+
corresponding to <code>c</code> in the block direction
1966+
with the
1967+
<a>first available font</a>
1968+
then fall back to the
1969+
layout algorithm of <a href="#layout-of-mtext"></a>.
1970+
<div class="note">
1971+
Here we treat a non-[=embellished operator/stretchy=] [=embellished operator/largeop=]
1972+
glyph as stretchy with target dimension <a>DisplayOperatorMinHeight</a>.
1973+
</div>
19731974
</li>
19741975
<li>
1975-
The <a>min-content inline size</a>,
1976-
<a>max-content inline size</a>,
1977-
<a>inline size</a> and block metrics of the math content
1978-
are given by the
1979-
glyph found.
1976+
The <a>min-content inline size</a> and
1977+
<a>max-content inline size</a> of the math content
1978+
are set to the <a>preferred inline size of a glyph
1979+
stretched along the block axis</a>.
19801980
</li>
19811981
<li>
1982-
Paint the glyph.
1982+
The <a>inline size</a>,
1983+
<a>ink line-ascent</a>,
1984+
<a>ink line-descent</a>,
1985+
<a>line-ascent</a> and
1986+
<a>line-descent</a>
1987+
of the math content
1988+
are obtained by the algorithm to
1989+
<a>shape a stretchy glyph</a>
1990+
to <a>block dimension</a>
1991+
<a>DisplayOperatorMinHeight</a>.
1992+
The <a>inline size</a> of the math content is the width of
1993+
the stretchy glyph. The stretchy glyph is shifted
1994+
towards the <a>line-under</a> by a value Δ so that its
1995+
center aligns with the center of the target when
1996+
[=embellished operator/symmetric=]:
1997+
the ink ascent of the math content is
1998+
the ascent of the stretchy glyph − Δ
1999+
and the ink descent of the math content is
2000+
the descent of the stretchy glyph + Δ.
2001+
<ul>
2002+
<li>
2003+
If the operator has the [=embellished operator/symmetric=] property,
2004+
then
2005+
Δ = [(ascent of stretchy glyph − descent of stretchy glyph) − 2 * <a>AxisHeight</a>] / 2.
2006+
</li>
2007+
<li>
2008+
Otherwise,
2009+
Δ = 0.
2010+
</li>
2011+
</ul>
2012+
<div class="note">
2013+
The point of Δ here is simply to vertically align the operator when [=embellished operator/symmetric=].
2014+
</div>
2015+
</li>
2016+
<li>
2017+
The painting of the operator is performed by the
2018+
algorithm to <a>shape a stretchy glyph</a>
2019+
stretched to <a>block dimension</a>
2020+
<a>DisplayOperatorMinHeight</a>
2021+
and at position determined by the previous box metrics
2022+
shifted by Δ towards the <a>line-under</a>.
19832023
</li>
19842024
</ol>
19852025
<figure id="figure-sum-base-and-displastyle-sizes">

0 commit comments

Comments
 (0)