KaTeX/metrics
Martin von Gagern b290d4ad76 Switch from fontforge to fonttools
The dependencies of fonttools are much lighter than fontforge, and since all
we need are some metrics, fonttools is very much up to that task.

This addresses issue #288.
2015-07-10 14:32:02 +02:00
..
extract_tfms.py Add accents 2014-09-13 21:30:35 -07:00
extract_ttfs.py Switch from fontforge to fonttools 2015-07-10 14:32:02 +02:00
format_json.py Format font metrix data to have one row for each glyph 2015-07-10 14:30:42 +02:00
mapping.pl Avoid non-determinisms related to font metric generation 2015-07-10 14:30:42 +02:00
parse_tfm.py Add accents 2014-09-13 21:30:35 -07:00
README.md Switch from fontforge to fonttools 2015-07-10 14:32:02 +02:00

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 (possibly using the cpan command line tool) or with your package manager.

  • You need the python module fonttools. You can install this either from PyPi (using easy_install or pip) or with your package manager.

Once you have these things, run

make metrics

which should generate new metrics and place them into fontMetricsData.json. You're done!