-
Notifications
You must be signed in to change notification settings - Fork 515
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
feat(mathml): always load MathML font, update Polyfill, use latest woff2 font #7620
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
caugner
changed the title
Always load mathml font
feat(mathml): always load MathML font, replace STIX.otf with latest STIX.woff2
Nov 18, 2022
Even if the browser supports MathML.
Otherwise stylelint fails if all files are ignored.
caugner
force-pushed
the
always-load-mathml-font
branch
from
November 18, 2022 17:34
e03e23e
to
5cec181
Compare
caugner
changed the title
feat(mathml): always load MathML font, replace STIX.otf with latest STIX.woff2
feat(mathml): always load MathML font, update Polyfill, use latest STIX.woff2
Nov 18, 2022
caugner
changed the title
feat(mathml): always load MathML font, update Polyfill, use latest STIX.woff2
feat(mathml): always load MathML font, update Polyfill, use latest woff2 font
Nov 18, 2022
caugner
commented
Nov 25, 2022
@font-face { | ||
font-family: "STIXRegular"; | ||
font-weight: normal; | ||
src: url("./font/STIXTwoMath-Regular.woff2") format("woff2"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
src: url("./font/STIXTwoMath-Regular.woff2") format("woff2"); | |
src: local('STIXTwoText') url("./font/STIXTwoMath-Regular.woff2") format("woff2"); |
caugner
commented
Nov 25, 2022
@font-face { | ||
font-family: "STIXRegular"; | ||
font-weight: normal; | ||
src: local("STIXTwoText") url("./font/STIXTwoMath-Regular.woff2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
src: local("STIXTwoText") url("./font/STIXTwoMath-Regular.woff2") | |
src: local("STIXTwoMath-Regular") url("./font/STIXTwoMath-Regular.woff2") |
caugner
force-pushed
the
always-load-mathml-font
branch
from
November 25, 2022 15:22
c2c3a8f
to
77f7ce7
Compare
caugner
commented
Nov 28, 2022
caugner
commented
Nov 28, 2022
Co-authored-by: Claas Augner <[email protected]>
fiji-flo
approved these changes
Nov 30, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great.
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #7607.
Problem
For browsers that don't support MathML, we load a MathML polyfill and a custom font (STIX TwoMath). This means that other browsers that support MathML use their default font for MathML, which might be different from that font.
Solution
Continue to load a MathML polyfill for browsers without support, but always load the custom font.
Note: The Polyfill doesn't apply to live samples, which are rendered in an (independent) iframe, but #7621 fixes that.
Screenshots
No visual change observed.
Before
After
How did you test this change?
Opened these pages in Chrome, Firefox and Safari: