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

Is there any way to overwrite MathJax font family for math equation to apply font families like Arial, Tahoma, Courier New etc. #319

Open
VSHUK10 opened this issue Jan 4, 2023 · 2 comments

Comments

@VSHUK10
Copy link

VSHUK10 commented Jan 4, 2023

No description provided.

@VSHUK10
Copy link
Author

VSHUK10 commented Jan 4, 2023

I tried overwriting font family Arial, Tahoma, Courier New, and Times new roman in mathjax class, but it is not changing the font-family, can someone help me on that.

@VSHUK10 VSHUK10 closed this as completed Jan 4, 2023
@VSHUK10 VSHUK10 changed the title Is there any way to overwrite math JAX equation to apply the font families like Arial, Tahoma, Courier New etc. Is there any way to overwrite math JAX font family for math equation to apply font families like Arial, Tahoma, Courier New etc. Jan 4, 2023
@VSHUK10 VSHUK10 changed the title Is there any way to overwrite math JAX font family for math equation to apply font families like Arial, Tahoma, Courier New etc. Is there any way to overwrite MathJax font family for math equation to apply font families like Arial, Tahoma, Courier New etc. Jan 4, 2023
@VSHUK10 VSHUK10 reopened this Jan 6, 2023
@dpvc
Copy link
Member

dpvc commented Jan 9, 2023

Is there any way to overwrite math JAX font family for math equation to apply font families like Arial, Tahoma, Courier New etc.

Math layout requires a wide range of specialized characters (parentheses in several sizes and the parts for constructing larger versions, several sizes for square roots, many mathematical symbols, arrows, and accents, greek characters, and characters in double-struck, Fraktur, script, calligraphic and other special forms). Most general-purpose fonts don't include the needed characters (that is true of the three you mention).

Also, MathJax needs to know a lot about the fonts that it uses (for example, the bounding box of each character, and the locations of the larger sized parentheses, which characters are in the fonts, etc.). That information is not something it can look up from the font on the fly, and so it is listed in javascript files that are loaded by MathJax. These files have to be created specifically for any font that MathJax would use. So it is not easy to replace the fonts used by MathJax, and it can not be done by setting CSS properties.

MathJax version 3 only provides one font, but version 4.0 (currently in alpha release) includes data for 11 fonts, so you may need to wait for that. (If you are using v2, there were several font alternatives available as well, so perhaps one of those would work for you.)

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

No branches or pull requests

2 participants