You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix steps ascent/paint adjustment for stretchy operators #200
The inline size, ink line-ascent, ink line-descent, line-ascent and line-descent of the content are obtained from the box metrics of a stretchy glyph stretched to block dimension Tascent + Tdescent. The inline size is the stretchy glyph width returned. If Δ = Tascent + Tdescent − (stretchy glyph ascent + stretchy glyph descent) then the ink ascent of the content is Tascent + Δ/2 and the ink descent of the content is Tdescent + Δ/2.
The painting of the operator is performed by the algorithm to shape a stretchy glyph stretched to block dimension T and at position determined by the previous box metrics shifted by Δ/2 towards the line-over.
is not correct, we don't want to shift Tdescent by half the error, but want to ensure the centers align.
At one of the MathML Core meetings, we discussed the shift amount and agreed that you shouldn't use Δ for both ascent and descent because of rounding problems. I.e, if Tascent - Tdescent − (stretchy glyph ascent - stretchy glyph descent) is odd, then Δ + Δ will be off by one when the spec says " the ink ascent of the content is the ascent of the stretchy glyph − Δ and the ink descent of the content is the descent of the stretchy glyph + Δ."
I'm also a little concerned that the spec talks about "the center of the target". They should be centered on the math axis. Is centering on math axis baked into this somehow?
I know this last point is a bit of nit picking, but we should still get this right... step 3 says "If there is not any block stretch size constraint (Tascent, Tdescent)...". If there is not any block stretch size constraint, then (Tascent, Tdescent) is not defined. I think their definition/reference should be in step 4.
Activity
NSoiffer commentedon Mar 23, 2020
At one of the MathML Core meetings, we discussed the shift amount and agreed that you shouldn't use Δ for both ascent and descent because of rounding problems. I.e, if Tascent - Tdescent − (stretchy glyph ascent - stretchy glyph descent) is odd, then Δ + Δ will be off by one when the spec says " the ink ascent of the content is the ascent of the stretchy glyph − Δ and the ink descent of the content is the descent of the stretchy glyph + Δ."
I'm also a little concerned that the spec talks about "the center of the target". They should be centered on the math axis. Is centering on math axis baked into this somehow?
I know this last point is a bit of nit picking, but we should still get this right... step 3 says "If there is not any block stretch size constraint (Tascent, Tdescent)...". If there is not any block stretch size constraint, then (Tascent, Tdescent) is not defined. I think their definition/reference should be in step 4.
fred-wang commentedon Mar 23, 2020
The math axis centering is handled somewhere else. See #202 for the issue.
About rounding, yes we need to fixup this and probably others.