w3c / w3c/mathml-core

Variable fonts and stretchy operators

Open
#122 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

level-2 need tests opentype / tex
Dominant language
HTML
Stars
56
Forks
20
PR merge metrics
No merged PRs in 30d

Description

cc @drott @behdad @SergeyMalkin @bkardell @tiroj

Opening this for the record...

See https://github.com/stipub/stixfonts/issues/125#issuecomment-420394717 (especially the video)

The main advantages would be that

  • It allows to reduce file size, which is probably interesting for math web fonts.
  • We could reuse glyph stretching existing code (but of course we would still need to continue to support existing fonts anyway).

The issue was raised during the web engines hackfest 2017 ( https://github.com/Igalia/webengineshackfest/wiki/2017#mathml-fonts ) and IIRC Behdad mentioned that main concern is that math stretching starts from a target stretch size while variable fonts starts from a variation-axis value. In general, we cannot guess which axis value will provide the proper target size without more assumptions on how the font is designed. Additionally, math font designers don't necessarily want to perfectly match a target size but sometimes just to reach something a bit larger than the target size. This is typically the case for the smallest sizes.

So I think the MathVariant subtable should be extended to somewhat have a mapping between target stretch size ranges and the proper glyph + variation-axis + variation-axis value combination:
https://docs.microsoft.com/en-us/typography/opentype/spec/math#mathvariants-table

Once this is standardized in the Open Font Format, we can add something in
https://mathml-refresh.github.io/mathml-core/#size-variants-for-operators-mathvariants

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 linked STIX Fonts discussion, the OpenType MathVariants table, and the MathML Core section on size variants for operators. Done would require an agreed mapping between target stretch ranges, glyphs, and variation-axis values, followed by corresponding standard and MathML Core updates.

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
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.