Automatic adjustment of font-size on math tag?
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 56
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
This is a follow-up of https://github.com/mathml-refresh/mathml/issues/37
With the rule math { font-family: math; }, the default behavior is to use a math font instead of inheriting the font from the parent that (likely) is not designed for math layout and would result in poor rendering.
The font-size is inherited, but since the surrounded text and the math formula uses two different font families, the actual size of glyphs is different.
MathJax has a configuration option to try and workaround this:
https://docs.mathjax.org/en/latest/options/output/index.html#output-matchfontheight
Do we want to enhance font-size with a property value that automatically perform this kind of font-size adjustment when changing the font-family?
Or do we want to add some special adjustment for "font-family: math" (when I checked WebKit and Chromium code, it seems they do something for font-family: monospace but not sure whether that's specified by CSS).
Or is it something that should be performed by a polyfill?
Or do we just don't care, and we should let people setup their CSS themselves?
(Note: of course, the ideal situation is when one uses a text font with its math companion, like STIX Two for the text and STIX Two Math for the math, see https://fred-wang.github.io/MathFonts/ ; this issue is about what we should do for the default)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading issue #37 and the linked MathJax matchFontHeight documentation. Compare the options described here: a new font-size value, special handling for font-family: math, a polyfill, or no built-in adjustment. Done means the project has a decided direction for default math font-size behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100