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

Variable fonts and stretchy operators #122

Open
fred-wang opened this issue Sep 14, 2019 · 2 comments
Open

Variable fonts and stretchy operators #122

fred-wang opened this issue Sep 14, 2019 · 2 comments

Comments

@fred-wang
Copy link
Contributor

cc @drott @behdad @SergeyMalkin @bkardell @tiroj

Opening this for the record...

See stipub/stixfonts#125 (comment) (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

@tiroj
Copy link

tiroj commented Dec 17, 2019

we cannot guess which axis value will provide the proper target size without more assumptions on how the font is designed

Right. As a font maker, I'd be looking to the layout and font format specs to standardise this. The existing registered OT variable font axes all have externally defined scales that enable layout interoperability, so we'd be looking for something similar in this case: an axis unit scale and scope that corresponds to the kinds of measurements the layout handler is doing to stretch operators in equations.

@fred-wang
Copy link
Contributor Author

consensus from 2020/06/24: postpone to a future version of core / opentype

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants