Add the ability to extract metrics from ttfs

Summary:
Upon switching over from ttf metrics to TeX metrics, we lost metrics for a
couple of the characters that are dynamically generated by TeX. Thus TeX doesn't
have metrics for them, but our fonts do have the characters because the MathJax
scripts also dynamically build them. This adds the ability to extract metrics
from the generated font files so that we can use the generated characters
correctly. A better solution would be to dynamically generate the characters
ourselves, but that is much harder, and will be left to a future time.

Test Plan:
 - Make sure typing "\neq \cong \text{ }" produces no warnings in the console.
 - Make sure huxley screenshots look the same

Reviewers: alpert

Reviewed By: alpert

Differential Revision: http://phabricator.khanacademy.org/D13107
This commit is contained in:
Emily Eisenberg
2014-09-12 14:59:28 -07:00
parent f52c84c187
commit 71da6aa50f
4 changed files with 56 additions and 6 deletions

View File

@@ -31,7 +31,7 @@ test:
./node_modules/.bin/jasmine-node test/katex-spec.js
metrics:
cd metrics && ./mapping.pl | ./extract_tfms.py | ./replace_line.py
cd metrics && ./mapping.pl | ./extract_tfms.py | ./extract_ttfs.py | ./replace_line.py
clean:
rm -rf build/*