mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-11 14:08:42 +00:00
Summary: Instead of using the metrics from our generated TTF files, use the fonts that TeX ships with. Pull the mapping out of the MathJax-dev repo from makeFF to get the correct mapping of metrics to font characters, and use our own tfm reader to extract metrics out of the tfm files into a useable format. Add a README and Makefile rule to make this process easier in the future. Also remove the silly 0.05em we put on supsubs because our italic correction works now. Test Plan: - Run huxley tests, see that changes are because of font metric changes. - See that the extension piece of `\bigl |` now extends above the top, as it is supposed to. Reviewers: alpert Reviewed By: alpert Differential Revision: http://phabricator.khanacademy.org/D12867
19 lines
565 B
Markdown
19 lines
565 B
Markdown
### How to generate new metrics
|
|
-------------------------------
|
|
|
|
There are several requirements for generating the metrics used by KaTeX.
|
|
|
|
- You need to have an installation of TeX which supports kpathsea (you can check
|
|
this by running `tex --version`, and seeing if it has a line that looks like >
|
|
kpathsea version 6.2.0
|
|
|
|
- You need the JSON module for perl. You can install this either from CPAN or with
|
|
your package manager.
|
|
|
|
Once you have these things, run
|
|
|
|
make metrics
|
|
|
|
which should generate new metrics and place them into `fontMetrics.js`. You're
|
|
done!
|