Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics for stretchy operators #58

Open
fred-wang opened this issue Mar 13, 2020 · 0 comments
Open

Metrics for stretchy operators #58

fred-wang opened this issue Mar 13, 2020 · 0 comments

Comments

@fred-wang
Copy link
Contributor

Currently, the core spec says to

  • Use MathGlyphVariantRecord.advanceMeasurement and GlyphAssembly.partRecords[PartIndex].fullAdvance when measuring along the stretch axis.
  • Use advance width and (ink) ascent/descent in the orthogonal direction of the stretch axis or when measuring the base glyph (this includes the case of preferred inline size since that's done for stretching along the block direction).

I believe for the base glyph and size variants, using advance width and ink ascent/descent is consistent with normal text. And hopefully fonts are designed such that the advance width of horizontal operators match the ink width.

For stretching glyph assembly along the block axis, I believe using the advance width is necessary to ensure correct alignment of parts.

For stretching glyph assembly along the inline axis, the alignment is ensured by aligning the glyph baselines. So using ink ascent/descent will work and this is consistent with normal math text.

Note: I think for performance using advance width or reading advance in the MATH table is faster than calculating the ink bounding box (although that's maybe not relevant if you need to do it anyway for the remaining metrics).

@NSoiffer NSoiffer transferred this issue from w3c/mathml Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant