Skip to content

Commit 677fd6a

Browse files
committed
Add hinting with ttfautohint
Summary: Run `ttfautohint` over all of the generated ttf files (before they are turned into eot/woff/woff2s) to produce better hinting on some characters. We always turn on windows compatibility, and manually turn on symbol-only mode for some fonts that it complained about without it. Test plan: - Run `make ttf` - See that things work, and there are no errors about symbol mode Auditors: alpert
1 parent 6abc660 commit 677fd6a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

default.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ TTF2EOT=ttf2eot
3232
TTF2SVG=/usr/share/java/batik-ttf2svg.jar
3333
TTX=ttx
3434
WOFF2=woff2_compress
35+
TTFAUTOHINT=ttfautohint
3536

3637
#### Image compression tools ####
3738
OPTIPNG=optipng

fonts/OTF/TeX/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,16 @@ ttf: ff
107107
$(FONTFORGE) -lang=ff -script ff/$$file; \
108108
done
109109

110+
@for file in `ls ttf/*.ttf`; do \
111+
echo "hinting $$file"; \
112+
if echo "$$file" | $(GREP) -q -e "Greek" -e "Size[1-4]" -e "Typewriter" -e "Win"; then \
113+
$(TTFAUTOHINT) --windows-compatibility --symbol $$file $$file.hinted; \
114+
else \
115+
$(TTFAUTOHINT) --windows-compatibility $$file $$file.hinted; \
116+
fi; \
117+
mv $$file.hinted $$file; \
118+
done
119+
110120
./fix_os2_metrics.rb ttf/
111121
eot: ttf
112122
mkdir -p eot

0 commit comments

Comments
 (0)