w3c / w3c/mathml-core

Metrics for stretchy operators

Open
#58 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
56
Forks
20
PR merge metrics
No merged PRs in 30d

Description

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).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the core spec passages covering MathGlyphVariantRecord.advanceMeasurement, GlyphAssembly.partRecords[PartIndex].fullAdvance, advance width, and ink ascent/descent. Determine whether the specification needs a resolved rule for base glyphs, size variants, and glyph assemblies; done means the metric behavior is decided and documented.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.