Files
KaTeX/dockers/fonts/README.md
ylemkimon ea409eaf1d fix(fonts): update fonts dependencies (#2866)
* fix(fonts): update fonts dependencies

* chore(fonts): fix buildMetrics for Python 3

* fix(fonts): update fonts

* test: update screenshots

* docs: update reference to katex-fonts

* chore: use Python 3

* fix(fonts): update fonts

* test: update screenshots

* Use explicit path

* Command-line arguments aren't actually supported

* Small buildMetrics fixes

* Add build:{fonts,metrics} script

* Lock versions of font-related dependencies

* Install minimal texlive

* Install fontforge

Co-authored-by: Erik Demaine <edemaine@mit.edu>
2021-08-29 07:06:42 +09:00

25 lines
869 B
Markdown

### How to generate KaTeX fonts and metrics
Originally based on MathJax font generation
#### Fonts
The `buildFonts.sh` script should do everything automatically,
as long as Docker is installed.
The script `buildFonts.sh` automatically creates Docker images
from the supplied `Dockerfile`.
It uses the hash of the file to tag the image, so a change to the file
will result in the creation of a new image.
If you want to see all created images, run `docker images katex/fonts`.
To remove all generated images, you can run
`docker rmi $(docker images --format '{{.Repository}}:{{.Tag}}' katex/fonts)`.
#### Metrics
The script `buildMetrics.sh` generates [metrics](../../src/fontMetricsData.js)
(dimensions of each character) for the generated fonts.
See [detailed requirements for running this script](../../src/metrics/).
If there is a problem, file a bug report.