What
- Add support for OpenType MATH table & related font features (https://learn.microsoft.com/en-us/typography/opentype/spec/math)
- investigate the possibility to remove the old TeX fonts and only use modern OpenType font containers (at least for the default fonts).
Why
At the moment Mogan (and TeXmacs) is able to use only very few math fonts (like Stix, TeX Gyre) and this support is hardwired in the C++ files and does not take into account all the informations available in the font files.
These fonts file contain the position in the font of extensible brackets or extensible glyphs like arrows, square roots, etcā¦, and the metrics to correctly position index and subscripts.
Some time ago Iāve started to implement some OpenType font support for TeXmacs, here: https://github.com/mgubi/texmacs/tree/wip-unicode-math
If some other developer is interested we could try to make it working in Mogan. TeXmacs still depends very much on old font formats while there are now available many free fonts in OpenType format which make it easier to support professional math typesetting. In particular there are Latin Modern fonts which can replace our old TeX fonts, and possibly improve speed since there will be less font searching.
One side goal could be to get rid of all TeX fonts and distribute only the OpenType variants. This is for example what ConTeXt does.:
https://wiki.contextgarden.net/ConTeXt_distribution's_Fonts
For a discussion see here: https://github.com/XmacsLabs/mogan/issues/523
How
- Study and document the font selection mechanism in TeXmacs, in particular how math glyphs are selected from the various fonts. Possibly write some debugging tools which allow developers to check the workings of which glyphs are selected, which metrics used, etcā¦
- Complete and debug the initial implementation of the MATH table parser here: https://github.com/mgubi/texmacs/tree/wip-unicode-math