Add tnum glyphs

While doing that, refactor the tests to have tnum tests
parent 1b437a23
Pipeline #131018189 passed with stages
in 11 minutes and 18 seconds
......@@ -9,14 +9,16 @@ TOOLDIR=tools
SRCDIR=sources
webfontscript=$(TOOLDIR)/webfonts.py
designspace=$(SRCDIR)/Manjari.designspace
tests=tests/tests.txt
tests=tests
BLDDIR=build
default: otf
all: clean lint otf ttf webfonts test
OTF=$(FONTS:%=$(BLDDIR)/$(NAME)-%.otf)
TTF=$(FONTS:%=$(BLDDIR)/$(NAME)-%.ttf)
WOFF2=$(FONTS:%=$(BLDDIR)/$(NAME)-%.woff2)
PDF=$(FONTS:%=$(BLDDIR)/$(NAME)-%.pdf)
PDFS=$(FONTS:%=$(BLDDIR)/$(NAME)-%-ligatures.pdf) \
$(FONTS:%=$(BLDDIR)/$(NAME)-%-content.pdf) \
$(FONTS:%=$(BLDDIR)/$(NAME)-%-numbers.pdf)
$(BLDDIR)/%.otf: $(SRCDIR)/%.ufo
@echo " BUILD $(@F)"
......@@ -30,12 +32,24 @@ $(BLDDIR)/%.woff2: $(BLDDIR)/%.otf
@echo "WEBFONT $(@F)"
@fonttools ttLib.woff2 compress $<
$(BLDDIR)/%.pdf: $(BLDDIR)/%.otf $(tests)
$(BLDDIR)/%-ligatures.pdf: $(BLDDIR)/%.ttf
@echo " TEST $(@F)"
@hb-view $< --font-size 14 --margin 100 --line-space 1.5 \
--foreground=333333 --text-file $(tests) \
--foreground=333333 --text-file $(tests)/ligatures.txt \
--output-file $(BLDDIR)/$(@F);
$(BLDDIR)/%-content.pdf: $(BLDDIR)/%.ttf
@echo " TEST $(@F)"
@hb-view $< --font-size 14 --margin 100 --line-space 1.5 \
--foreground=333333 --text-file $(tests)/content.txt \
--output-file $(BLDDIR)/$(@F);
$(BLDDIR)/%-numbers.pdf: $(BLDDIR)/%.ttf
@echo " TEST $(@F)"
@hb-view $< --font-size 14 --margin 100 --line-space 1.5 \
--foreground=333333 --text-file $(tests)/numbers.txt \
--features="tnum" --output-file $(BLDDIR)/$(@F);
ttf: $(TTF)
otf: $(OTF)
webfonts: $(WOFF2)
......@@ -52,7 +66,7 @@ install: otf
@mkdir -p ${DESTDIR}${INSTALLPATH}
install -D -m 0644 $(BLDDIR)/*.otf ${DESTDIR}${INSTALLPATH}/
test: otf $(PDF)
test: otf $(PDFS)
clean:
@rm -rf $(BLDDIR)
......@@ -9,4 +9,5 @@ include (features/features.fea)
include (Manjari-Bold.ufo/gpos.fea)
include (Manjari-Bold.ufo/kerning.fea)
include (features/styles.fea)
include (features/zero.fea)
\ No newline at end of file
include (features/zero.fea)
include (features/tnum.fea)
\ No newline at end of file
......@@ -402,6 +402,8 @@
<string>egrave.glif</string>
<key>eight</key>
<string>eight.glif</string>
<key>eight.tnum</key>
<string>eight.tnum.glif</string>
<key>ellipsis</key>
<string>ellipsis.glif</string>
<key>emacron</key>
......@@ -422,8 +424,12 @@
<string>f.glif</string>
<key>five</key>
<string>five.glif</string>
<key>five.tnum</key>
<string>five.tnum.glif</string>
<key>four</key>
<string>four.glif</string>
<key>four.tnum</key>
<string>four.tnum.glif</string>
<key>g</key>
<string>g.glif</string>
<key>gcircumflex</key>
......@@ -958,6 +964,8 @@
<string>nhxx.glif</string>
<key>nine</key>
<string>nine.glif</string>
<key>nine.tnum</key>
<string>nine.tnum.glif</string>
<key>nj</key>
<string>nj.glif</string>
<key>njch1</key>
......@@ -1014,6 +1022,8 @@
<string>omacron.glif</string>
<key>one</key>
<string>one.glif</string>
<key>one.tnum</key>
<string>one.tnum.glif</string>
<key>orumaa</key>
<string>orumaa.glif</string>
<key>oslash</key>
......@@ -1280,6 +1290,8 @@
<string>semicolon.glif</string>
<key>seven</key>
<string>seven.glif</string>
<key>seven.tnum</key>
<string>seven.tnum.glif</string>
<key>sh</key>
<string>sh.glif</string>
<key>sh1p1</key>
......@@ -1316,6 +1328,8 @@
<string>shxx.glif</string>
<key>six</key>
<string>six.glif</string>
<key>six.tnum</key>
<string>six.tnum.glif</string>
<key>slash</key>
<string>slash.glif</string>
<key>space</key>
......@@ -1518,8 +1532,12 @@
<string>thorn.glif</string>
<key>three</key>
<string>three.glif</string>
<key>three.tnum</key>
<string>three.tnum.glif</string>
<key>two</key>
<string>two.glif</string>
<key>two.tnum</key>
<string>two.tnum.glif</string>
<key>u</key>
<string>u.glif</string>
<key>u1</key>
......@@ -1728,6 +1746,8 @@
<string>zero.glif</string>
<key>zero.slash</key>
<string>zero.slash.glif</string>
<key>zero.tnum</key>
<string>zero.tnum.glif</string>
<key>zh</key>
<string>zh.glif</string>
<key>zh1ch1</key>
......
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="eight" format="2">
<unicode hex="0038"/>
<advance width="1200"/>
<advance width="1121"/>
<outline>
<contour>
<point x="1016" y="984" type="curve" smooth="yes"/>
<point x="1016" y="871"/>
<point x="969" y="779"/>
<point x="878" y="707" type="curve"/>
<point x="978" y="640"/>
<point x="1061" y="528"/>
<point x="1061" y="382" type="curve" smooth="yes"/>
<point x="1061" y="140"/>
<point x="836" y="-19"/>
<point x="600" y="-19" type="curve" smooth="yes"/>
<point x="362" y="-19"/>
<point x="140" y="138"/>
<point x="140" y="384" type="curve" smooth="yes"/>
<point x="140" y="533"/>
<point x="223" y="643"/>
<point x="321" y="708" type="curve"/>
<point x="240" y="774"/>
<point x="185" y="873"/>
<point x="185" y="999" type="curve" smooth="yes"/>
<point x="185" y="1214"/>
<point x="382" y="1380"/>
<point x="598" y="1380" type="curve" smooth="yes"/>
<point x="822" y="1380"/>
<point x="1016" y="1212"/>
<point x="976" y="984" type="curve" smooth="yes"/>
<point x="976" y="871"/>
<point x="929" y="779"/>
<point x="838" y="707" type="curve"/>
<point x="938" y="640"/>
<point x="1021" y="528"/>
<point x="1021" y="382" type="curve" smooth="yes"/>
<point x="1021" y="140"/>
<point x="796" y="-19"/>
<point x="560" y="-19" type="curve" smooth="yes"/>
<point x="322" y="-19"/>
<point x="100" y="138"/>
<point x="100" y="384" type="curve" smooth="yes"/>
<point x="100" y="533"/>
<point x="183" y="643"/>
<point x="281" y="708" type="curve"/>
<point x="200" y="774"/>
<point x="145" y="873"/>
<point x="145" y="999" type="curve" smooth="yes"/>
<point x="145" y="1214"/>
<point x="342" y="1380"/>
<point x="558" y="1380" type="curve" smooth="yes"/>
<point x="782" y="1380"/>
<point x="976" y="1212"/>
</contour>
<contour>
<point x="384" y="996" type="curve" smooth="yes"/>
<point x="384" y="891"/>
<point x="484" y="807"/>
<point x="601" y="807" type="curve" smooth="yes"/>
<point x="716" y="807"/>
<point x="816" y="881"/>
<point x="816" y="995" type="curve" smooth="yes"/>
<point x="816" y="1097"/>
<point x="710" y="1181"/>
<point x="604" y="1181" type="curve" smooth="yes"/>
<point x="485" y="1181"/>
<point x="384" y="1101"/>
<point x="344" y="996" type="curve" smooth="yes"/>
<point x="344" y="891"/>
<point x="444" y="807"/>
<point x="561" y="807" type="curve" smooth="yes"/>
<point x="676" y="807"/>
<point x="776" y="881"/>
<point x="776" y="995" type="curve" smooth="yes"/>
<point x="776" y="1097"/>
<point x="670" y="1181"/>
<point x="564" y="1181" type="curve" smooth="yes"/>
<point x="445" y="1181"/>
<point x="344" y="1101"/>
</contour>
<contour>
<point x="859" y="386" type="curve" smooth="yes"/>
<point x="859" y="502"/>
<point x="735" y="590"/>
<point x="598" y="590" type="curve" smooth="yes"/>
<point x="463" y="590"/>
<point x="340" y="509"/>
<point x="340" y="386" type="curve" smooth="yes"/>
<point x="340" y="267"/>
<point x="461" y="181"/>
<point x="600" y="181" type="curve" smooth="yes"/>
<point x="739" y="181"/>
<point x="859" y="267"/>
<point x="819" y="386" type="curve" smooth="yes"/>
<point x="819" y="502"/>
<point x="695" y="590"/>
<point x="558" y="590" type="curve" smooth="yes"/>
<point x="423" y="590"/>
<point x="300" y="509"/>
<point x="300" y="386" type="curve" smooth="yes"/>
<point x="300" y="267"/>
<point x="421" y="181"/>
<point x="560" y="181" type="curve" smooth="yes"/>
<point x="699" y="181"/>
<point x="819" y="267"/>
</contour>
</outline>
<lib>
......
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="eight.tnum" format="2">
<advance width="1300"/>
<outline>
<component base="eight" xOffset="89"/>
</outline>
</glyph>
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="five" format="2">
<unicode hex="0035"/>
<advance width="1200"/>
<advance width="1185"/>
<outline>
<contour>
<point x="262" y="590" type="curve" smooth="yes"/>
<point x="208.404" y="590"/>
<point x="158.798" y="623.513"/>
<point x="158.798" y="679.847" type="curve" smooth="yes"/>
<point x="265" y="1293" type="line" smooth="yes"/>
<point x="273" y="1342"/>
<point x="315" y="1377"/>
<point x="363" y="1377" type="curve" smooth="yes"/>
<point x="975" y="1377" type="line" smooth="yes"/>
<point x="1024" y="1377"/>
<point x="1075" y="1336"/>
<point x="1075" y="1285" type="curve" smooth="yes"/>
<point x="1075" y="1226"/>
<point x="1035" y="1177"/>
<point x="975" y="1177" type="curve" smooth="yes"/>
<point x="447" y="1177" type="line"/>
<point x="401" y="918" type="line"/>
<point x="464" y="945"/>
<point x="525" y="957"/>
<point x="591" y="957" type="curve" smooth="yes"/>
<point x="872" y="957"/>
<point x="1093" y="747"/>
<point x="1093" y="469" type="curve" smooth="yes"/>
<point x="1093" y="188"/>
<point x="867" y="-25"/>
<point x="582" y="-25" type="curve" smooth="yes"/>
<point x="364" y="-25"/>
<point x="194" y="105"/>
<point x="118" y="258" type="curve" smooth="yes"/>
<point x="111" y="273"/>
<point x="108" y="289"/>
<point x="108" y="307" type="curve" smooth="yes"/>
<point x="108" y="352"/>
<point x="155" y="395"/>
<point x="202" y="395" type="curve" smooth="yes"/>
<point x="244" y="395"/>
<point x="279" y="377"/>
<point x="298" y="341" type="curve" smooth="yes"/>
<point x="346" y="250"/>
<point x="445" y="175"/>
<point x="583" y="175" type="curve" smooth="yes"/>
<point x="758" y="175"/>
<point x="893" y="301"/>
<point x="893" y="467" type="curve" smooth="yes"/>
<point x="893" y="632"/>
<point x="764" y="755"/>
<point x="578" y="755" type="curve" smooth="yes"/>
<point x="484" y="755"/>
<point x="383" y="689"/>
<point x="341" y="631" type="curve" smooth="yes"/>
<point x="323" y="605"/>
<point x="295" y="590"/>
<point x="254" y="590" type="curve" smooth="yes"/>
<point x="200.404" y="590"/>
<point x="150.798" y="623.513"/>
<point x="150.798" y="679.847" type="curve" smooth="yes"/>
<point x="257" y="1293" type="line" smooth="yes"/>
<point x="265" y="1342"/>
<point x="307" y="1377"/>
<point x="355" y="1377" type="curve" smooth="yes"/>
<point x="967" y="1377" type="line" smooth="yes"/>
<point x="1016" y="1377"/>
<point x="1067" y="1336"/>
<point x="1067" y="1285" type="curve" smooth="yes"/>
<point x="1067" y="1226"/>
<point x="1027" y="1177"/>
<point x="967" y="1177" type="curve" smooth="yes"/>
<point x="439" y="1177" type="line"/>
<point x="393" y="918" type="line"/>
<point x="456" y="945"/>
<point x="517" y="957"/>
<point x="583" y="957" type="curve" smooth="yes"/>
<point x="864" y="957"/>
<point x="1085" y="747"/>
<point x="1085" y="469" type="curve" smooth="yes"/>
<point x="1085" y="188"/>
<point x="859" y="-25"/>
<point x="574" y="-25" type="curve" smooth="yes"/>
<point x="356" y="-25"/>
<point x="186" y="105"/>
<point x="110" y="258" type="curve" smooth="yes"/>
<point x="103" y="273"/>
<point x="100" y="289"/>
<point x="100" y="307" type="curve" smooth="yes"/>
<point x="100" y="352"/>
<point x="147" y="395"/>
<point x="194" y="395" type="curve" smooth="yes"/>
<point x="236" y="395"/>
<point x="271" y="377"/>
<point x="290" y="341" type="curve" smooth="yes"/>
<point x="338" y="250"/>
<point x="437" y="175"/>
<point x="575" y="175" type="curve" smooth="yes"/>
<point x="750" y="175"/>
<point x="885" y="301"/>
<point x="885" y="467" type="curve" smooth="yes"/>
<point x="885" y="632"/>
<point x="756" y="755"/>
<point x="570" y="755" type="curve" smooth="yes"/>
<point x="476" y="755"/>
<point x="375" y="689"/>
<point x="333" y="631" type="curve" smooth="yes"/>
<point x="315" y="605"/>
<point x="287" y="590"/>
</contour>
</outline>
<lib>
......
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="five.tnum" format="2">
<advance width="1300"/>
<outline>
<component base="five" xOffset="57"/>
</outline>
</glyph>
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="four" format="2">
<unicode hex="0034"/>
<advance width="1200"/>
<advance width="1353"/>
<outline>
<contour>
<point x="778" y="-21" type="curve" smooth="yes"/>
<point x="722.373" y="-21"/>
<point x="678" y="21.2793"/>
<point x="678" y="75" type="curve" smooth="yes"/>
<point x="677" y="371" type="line"/>
<point x="124" y="373" type="line" smooth="yes"/>
<point x="71" y="373"/>
<point x="24" y="417"/>
<point x="24" y="470" type="curve" smooth="yes"/>
<point x="24" y="493"/>
<point x="30" y="515"/>
<point x="45" y="534" type="curve" smooth="yes"/>
<point x="696" y="1322" type="line" smooth="yes"/>
<point x="715" y="1346"/>
<point x="742" y="1359"/>
<point x="772" y="1359" type="curve" smooth="yes"/>
<point x="828" y="1359"/>
<point x="874" y="1317"/>
<point x="874" y="1262" type="curve" smooth="yes"/>
<point x="877" y="573" type="line"/>
<point x="943.668" y="572.668"/>
<point x="1010.32" y="572.323"/>
<point x="1077" y="572" type="curve" smooth="yes"/>
<point x="1132" y="572"/>
<point x="1177" y="528"/>
<point x="1177" y="472" type="curve" smooth="yes"/>
<point x="1177" y="415.763"/>
<point x="1132.4" y="370"/>
<point x="1075" y="370" type="curve" smooth="yes"/>
<point x="877" y="371" type="line"/>
<point x="878" y="75" type="line" smooth="yes"/>
<point x="878" y="21.2789"/>
<point x="833.63" y="-21"/>
<point x="854" y="-21" type="curve" smooth="yes"/>
<point x="798.373" y="-21"/>
<point x="754" y="21.2793"/>
<point x="754" y="75" type="curve" smooth="yes"/>
<point x="753" y="371" type="line"/>
<point x="200" y="373" type="line" smooth="yes"/>
<point x="147" y="373"/>
<point x="100" y="417"/>
<point x="100" y="470" type="curve" smooth="yes"/>
<point x="100" y="493"/>
<point x="106" y="515"/>
<point x="121" y="534" type="curve" smooth="yes"/>
<point x="772" y="1322" type="line" smooth="yes"/>
<point x="791" y="1346"/>
<point x="818" y="1359"/>
<point x="848" y="1359" type="curve" smooth="yes"/>
<point x="904" y="1359"/>
<point x="950" y="1317"/>
<point x="950" y="1262" type="curve" smooth="yes"/>
<point x="953" y="573" type="line"/>
<point x="1019.668" y="572.668"/>
<point x="1086.32" y="572.323"/>
<point x="1153" y="572" type="curve" smooth="yes"/>
<point x="1208" y="572"/>
<point x="1253" y="528"/>
<point x="1253" y="472" type="curve" smooth="yes"/>
<point x="1253" y="415.763"/>
<point x="1208.4" y="370"/>
<point x="1151" y="370" type="curve" smooth="yes"/>
<point x="953" y="371" type="line"/>
<point x="954" y="75" type="line" smooth="yes"/>
<point x="954" y="21.2789"/>
<point x="909.63" y="-21"/>
</contour>
<contour>
<point x="677" y="573" type="line"/>
<point x="675" y="989" type="line"/>
<point x="331" y="575" type="line"/>
<point x="753" y="573" type="line"/>
<point x="751" y="989" type="line"/>
<point x="407" y="575" type="line"/>
</contour>
</outline>
<lib>
......
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="four.tnum" format="2">
<advance width="1300"/>
<outline>
<component base="four" xOffset="-26"/>
</outline>
</glyph>
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="nine" format="2">
<unicode hex="0039"/>
<advance width="1217.8102192601"/>
<advance width="1266"/>
<outline>
<contour>
<point x="67" y="915" type="curve" smooth="yes"/>
<point x="67" y="1160"/>
<point x="261" y="1383"/>
<point x="556" y="1383" type="curve" smooth="yes"/>
<point x="928" y="1383"/>
<point x="1133" y="1009"/>
<point x="1133" y="626" type="curve" smooth="yes"/>
<point x="1133" y="291"/>
<point x="954" y="-45"/>
<point x="576" y="-45" type="curve" smooth="yes"/>
<point x="402" y="-45"/>
<point x="263" y="46"/>
<point x="185" y="160" type="curve" smooth="yes"/>
<point x="173" y="175"/>
<point x="167" y="196"/>
<point x="167" y="219" type="curve" smooth="yes"/>
<point x="167" y="266"/>
<point x="207" y="313"/>
<point x="261" y="313" type="curve" smooth="yes"/>
<point x="299" y="313"/>
<point x="331" y="298"/>
<point x="351" y="270" type="curve" smooth="yes"/>
<point x="396" y="207"/>
<point x="476" y="154"/>
<point x="576" y="154" type="curve" smooth="yes"/>
<point x="820" y="154"/>
<point x="927" y="372"/>
<point x="932" y="608" type="curve"/>
<point x="849" y="507"/>
<point x="722" y="430"/>
<point x="560" y="430" type="curve" smooth="yes"/>
<point x="290" y="430"/>
<point x="67" y="629"/>
<point x="100" y="915" type="curve" smooth="yes"/>
<point x="100" y="1160"/>
<point x="294" y="1383"/>
<point x="589" y="1383" type="curve" smooth="yes"/>
<point x="961" y="1383"/>
<point x="1166" y="1009"/>
<point x="1166" y="626" type="curve" smooth="yes"/>
<point x="1166" y="291"/>
<point x="987" y="-45"/>
<point x="609" y="-45" type="curve" smooth="yes"/>
<point x="435" y="-45"/>
<point x="296" y="46"/>
<point x="218" y="160" type="curve" smooth="yes"/>
<point x="206" y="175"/>
<point x="200" y="196"/>
<point x="200" y="219" type="curve" smooth="yes"/>
<point x="200" y="266"/>
<point x="240" y="313"/>
<point x="294" y="313" type="curve" smooth="yes"/>
<point x="332" y="313"/>
<point x="364" y="298"/>
<point x="384" y="270" type="curve" smooth="yes"/>
<point x="429" y="207"/>
<point x="509" y="154"/>
<point x="609" y="154" type="curve" smooth="yes"/>
<point x="853" y="154"/>
<point x="960" y="372"/>
<point x="965" y="608" type="curve"/>
<point x="882" y="507"/>
<point x="755" y="430"/>