Update metrics using TeX metrics instead of TTF metrics

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
This commit is contained in:
Emily Eisenberg
2014-09-03 20:12:00 -07:00
parent 2d2d319287
commit e418fd9ee3
26 changed files with 1267 additions and 53 deletions

View File

@@ -1,6 +1,6 @@
UNAME=$(shell uname)
.PHONY: build setup copy serve clean
.PHONY: build setup copy serve clean metrics
build: setup build/katex.js build/katex.less.css
ifeq ($(UNAME),Darwin)
build: pdiff
@@ -36,5 +36,8 @@ pdiff:
@printf "Comparing to reference pdiff image...\n"
@node test/pdiff.js
metrics:
cd metrics && ./mapping.pl | ./extract_tfms.py | ./replace_line.py
clean:
rm -rf build/*