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

Improve fontdata build tools #13

Closed
pkra opened this issue Mar 17, 2015 · 4 comments
Closed

Improve fontdata build tools #13

pkra opened this issue Mar 17, 2015 · 4 comments

Comments

@pkra
Copy link

pkra commented Mar 17, 2015

Streamline the tools so that developers can easily add support for their custom fonts (e.g., ebook readers, apps etc)

@drochgenius
Copy link

+1

I would need to add support for a custom font. Given that I have the font files at hand, not sure what are the steps required to generate the font data for MathJax.

Any hint would be greatly appreciated,

Thanks

@pkra
Copy link
Author

pkra commented Oct 13, 2016

It's a pretty complicated process, I'm afraid, and complexity depends on the font you're trying to add.

Right now, if you have fonts with math tables, then https://github.com/mathjax/MathJax-dev/tree/master/fonts/OpenTypeMath is probably the best place to start. You'll need to specify how to split the fonts and generate the font metric data. Then you'll have to integrate this into MathJax in a separate step.

If your font doesn't have math tables (i.e., almost all fonts), then the question is if it has the necessary characters for math at all and you'll likely have to create parts of the font data and metrics manually (since e.g. stretchy parts won't be on Unicode positions). Alternatively, you could use an already supported font to provide a fallback.

@drochgenius
Copy link

Hi Peter,

Thanks for the quick response. I will review the available options from our side first.
If I could get the math tables for the font, then I understand it would make the process easier.
We'd like to build content for young children, adapting the font to their reading skills. For example, digits would be slightly closer to handwriting.

Regards

@pkra
Copy link
Author

pkra commented Oct 14, 2016

It sounds unlikely that such a font will have the necessary glyphs to be used on its own -- and you probably just want roughly the ascii range from the new font; that's a use case we've encountered before.

The "right" way for this would be for us to implement a more flexible fallback chain so that you can use a "non-math" font in combination with one of the supported fonts.

We are hoping to get to the font chain early next year (as part of v3.0) and making such use cases easier is definitely a goal.

@pkra pkra closed this as completed Jul 16, 2021
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