MathJax-src
MathJax-src copied to clipboard
Updates to support alternate fonts in CHTML
This PR finalizes the updates needed for additional font support by updating the CHTML output to handle the alternate fonts being prepared in the fonts repository.
- Provide for updating the CSS when a new font is loaded
- Creates an
addFontIds()function that inserts the needed font ID data into a font definition (to save hading the samefoption in each of the character's data). - Updates the creation of CSS for the stretchy characters to include the font explicitly, when needed
- Assumes the ZERO font will have a space that is one em wide (making it easier to handle in-line breakpoints for linebreaking). This affects both SVG and CHTML output, and it will make it not work with the current MathJax_Zero font, whose space is .25 em, so the spacing will be too small when used with that font. (It will be replaced in the next release, as the while MathJax TeX font set will be replaced by a new one.)
- Adds support for CHTML font extensions (making sure the CSS is properly updated).
- Removes
defaultVariantClassesas they are never actually used (no CSS is created for these classes) - Fix an issue with the
buildcommand so that file names with no alphanumeric characters are handled properly (the new additional fonts have such names).