1
1
mirror of https://github.com/rsms/inter.git synced 2024-11-24 05:30:41 +03:00

Fixes tabular numbers for medium, bold and black weights. Closes #60

This commit is contained in:
Rasmus Andersson 2018-08-28 20:05:44 -07:00
parent 8978692074
commit 5b246166f2
21 changed files with 240 additions and 69 deletions

View File

@ -1,21 +1 @@
include(../features.fea); include(../features.fea);
@TNUM_L = [
zero one two three five six seven eight nine
one.1 four.1 six.1 nine.1
period comma
];
@TNUM_R = [
zero.tnum one.tnum two.tnum three.tnum five.tnum six.tnum seven.tnum eight.tnum nine.tnum
one.tnum.1 four.tnum.1 six.tnum.1 nine.tnum.1
period.tnum comma.tnum
];
feature tnum {
sub @TNUM_L by @TNUM_R;
} tnum;
feature zero {
sub zero by zero.slash;
sub zero.tnum by zero.tnum.slash;
} zero;

View File

@ -938,6 +938,8 @@
<string>four.frac.glif</string> <string>four.frac.glif</string>
<key>four.sup</key> <key>four.sup</key>
<string>four.sup.glif</string> <string>four.sup.glif</string>
<key>four.tnum</key>
<string>four.tnum.glif</string>
<key>four.tnum.1</key> <key>four.tnum.1</key>
<string>four.tnum.1.glif</string> <string>four.tnum.1.glif</string>
<key>fourroman</key> <key>fourroman</key>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="four.tnum" format="1">
<advance width="1824"/>
<outline>
<component base="four" xOffset="32"/>
</outline>
<lib>
<dict>
<key>com.typemytype.robofont.mark</key>
<array>
<real>0.9230863777</real>
<real>0.9647658846</real>
<real>0.7857136537</real>
<real>1.0</real>
</array>
</dict>
</lib>
</glyph>

View File

@ -2,13 +2,7 @@
<glyph name="zero.tnum.slash" format="1"> <glyph name="zero.tnum.slash" format="1">
<advance width="1824"/> <advance width="1824"/>
<outline> <outline>
<contour> <component base="zero.slash" xOffset="64"/>
<point x="1156" y="1848" type="line"/>
<point x="412" y="336" type="line"/>
<point x="660" y="160" type="line"/>
<point x="1412" y="1680" type="line"/>
</contour>
<component base="zero" xOffset="64"/>
</outline> </outline>
<lib> <lib>
<dict> <dict>

View File

@ -511,6 +511,7 @@
<string>three.tnum</string> <string>three.tnum</string>
<string>four</string> <string>four</string>
<string>four.1</string> <string>four.1</string>
<string>four.tnum</string>
<string>four.tnum.1</string> <string>four.tnum.1</string>
<string>five</string> <string>five</string>
<string>five.tnum</string> <string>five.tnum</string>
@ -1828,6 +1829,7 @@
<string>three.tnum</string> <string>three.tnum</string>
<string>four</string> <string>four</string>
<string>four.1</string> <string>four.1</string>
<string>four.tnum</string>
<string>four.tnum.1</string> <string>four.tnum.1</string>
<string>five</string> <string>five</string>
<string>five.tnum</string> <string>five.tnum</string>

View File

@ -1,20 +1 @@
include(../features.fea); include(../features.fea);
@TNUM_L = [
one two seven
one.1 four.1 six.1 nine.1
period comma
];
@TNUM_R = [
one.tnum two.tnum seven.tnum
one.tnum.1 four.tnum.1 six.tnum.1 nine.tnum.1
period.tnum comma.tnum
];
feature tnum {
sub @TNUM_L by @TNUM_R;
} tnum;
feature zero {
sub zero by zero.slash;
} zero;

View File

@ -790,6 +790,8 @@
<string>eight.frac.glif</string> <string>eight.frac.glif</string>
<key>eight.sup</key> <key>eight.sup</key>
<string>eight.sup.glif</string> <string>eight.sup.glif</string>
<key>eight.tnum</key>
<string>eight.tnum.glif</string>
<key>eightroman</key> <key>eightroman</key>
<string>eightroman.glif</string> <string>eightroman.glif</string>
<key>eightsub</key> <key>eightsub</key>
@ -916,6 +918,8 @@
<string>five.frac.glif</string> <string>five.frac.glif</string>
<key>five.sup</key> <key>five.sup</key>
<string>five.sup.glif</string> <string>five.sup.glif</string>
<key>five.tnum</key>
<string>five.tnum.glif</string>
<key>fiveeighths</key> <key>fiveeighths</key>
<string>fiveeighths.glif</string> <string>fiveeighths.glif</string>
<key>fiveroman</key> <key>fiveroman</key>
@ -934,6 +938,8 @@
<string>four.frac.glif</string> <string>four.frac.glif</string>
<key>four.sup</key> <key>four.sup</key>
<string>four.sup.glif</string> <string>four.sup.glif</string>
<key>four.tnum</key>
<string>four.tnum.glif</string>
<key>four.tnum.1</key> <key>four.tnum.1</key>
<string>four.tnum.1.glif</string> <string>four.tnum.1.glif</string>
<key>fourroman</key> <key>fourroman</key>
@ -1254,6 +1260,8 @@
<string>nine.frac.glif</string> <string>nine.frac.glif</string>
<key>nine.sup</key> <key>nine.sup</key>
<string>nine.sup.glif</string> <string>nine.sup.glif</string>
<key>nine.tnum</key>
<string>nine.tnum.glif</string>
<key>nine.tnum.1</key> <key>nine.tnum.1</key>
<string>nine.tnum.1.glif</string> <string>nine.tnum.1.glif</string>
<key>nineinferior</key> <key>nineinferior</key>
@ -1640,6 +1648,8 @@
<string>six.frac.glif</string> <string>six.frac.glif</string>
<key>six.sup</key> <key>six.sup</key>
<string>six.sup.glif</string> <string>six.sup.glif</string>
<key>six.tnum</key>
<string>six.tnum.glif</string>
<key>six.tnum.1</key> <key>six.tnum.1</key>
<string>six.tnum.1.glif</string> <string>six.tnum.1.glif</string>
<key>sixinferior</key> <key>sixinferior</key>
@ -1724,6 +1734,8 @@
<string>three.glif</string> <string>three.glif</string>
<key>three.sup</key> <key>three.sup</key>
<string>three.sup.glif</string> <string>three.sup.glif</string>
<key>three.tnum</key>
<string>three.tnum.glif</string>
<key>threeeighths</key> <key>threeeighths</key>
<string>threeeighths.glif</string> <string>threeeighths.glif</string>
<key>threequarters</key> <key>threequarters</key>
@ -2586,6 +2598,10 @@
<string>zero.slash.glif</string> <string>zero.slash.glif</string>
<key>zero.sup</key> <key>zero.sup</key>
<string>zero.sup.glif</string> <string>zero.sup.glif</string>
<key>zero.tnum</key>
<string>zero.tnum.glif</string>
<key>zero.tnum.slash</key>
<string>zero.tnum.slash.glif</string>
<key>zerosub</key> <key>zerosub</key>
<string>zerosub.glif</string> <string>zerosub.glif</string>
<key>zerosuperior</key> <key>zerosuperior</key>

View File

@ -4,18 +4,18 @@
<unicode hex="02D9"/> <unicode hex="02D9"/>
<outline> <outline>
<contour> <contour>
<point x="332" y="1772" type="curve"/> <point x="332" y="1780" type="curve"/>
<point x="436" y="1772"/> <point x="436" y="1780"/>
<point x="500" y="1844"/> <point x="500" y="1852"/>
<point x="500" y="1932" type="curve"/> <point x="500" y="1940" type="curve"/>
<point x="500" y="2012"/> <point x="500" y="2020"/>
<point x="436" y="2092"/> <point x="436" y="2100"/>
<point x="332" y="2092" type="curve"/> <point x="332" y="2100" type="curve"/>
<point x="228" y="2092"/> <point x="228" y="2100"/>
<point x="164" y="2012"/> <point x="164" y="2020"/>
<point x="164" y="1932" type="curve" smooth="yes"/> <point x="164" y="1940" type="curve" smooth="yes"/>
<point x="164" y="1844"/> <point x="164" y="1852"/>
<point x="228" y="1772"/> <point x="228" y="1780"/>
</contour> </contour>
<contour> <contour>
<point x="332" y="1792" type="move" name="_top"/> <point x="332" y="1792" type="move" name="_top"/>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="eight.tnum" format="1">
<advance width="1680"/>
<outline>
<component base="eight"/>
</outline>
<lib>
<dict>
<key>com.typemytype.robofont.mark</key>
<array>
<real>0.9058</real>
<real>0.9634</real>
<real>0.7395</real>
<real>1.0</real>
</array>
</dict>
</lib>
</glyph>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="five.tnum" format="1">
<advance width="1680"/>
<outline>
<component base="five"/>
</outline>
<lib>
<dict>
<key>com.typemytype.robofont.mark</key>
<array>
<real>0.9058</real>
<real>0.9634</real>
<real>0.7395</real>
<real>1.0</real>
</array>
</dict>
</lib>
</glyph>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="four.tnum" format="1">
<advance width="1680"/>
<outline>
<component base="four"/>
</outline>
<lib>
<dict>
<key>com.typemytype.robofont.mark</key>
<array>
<real>0.9058</real>
<real>0.9634</real>
<real>0.7395</real>
<real>1.0</real>
</array>
</dict>
</lib>
</glyph>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="nine.tnum" format="1">
<advance width="1680"/>
<outline>
<component base="nine"/>
</outline>
<lib>
<dict>
<key>com.typemytype.robofont.mark</key>
<array>
<real>0.9058</real>
<real>0.9634</real>
<real>0.7395</real>
<real>1.0</real>
</array>
</dict>
</lib>
</glyph>

View File

@ -14,9 +14,9 @@
<dict> <dict>
<key>com.typemytype.robofont.mark</key> <key>com.typemytype.robofont.mark</key>
<array> <array>
<real>0.9230863776848417</real> <real>0.9230863777</real>
<real>0.9647658846</real> <real>0.9647658846</real>
<real>0.7857136537221083</real> <real>0.7857136537</real>
<real>1.0</real> <real>1.0</real>
</array> </array>
</dict> </dict>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="six.tnum" format="1">
<advance width="1680"/>
<outline>
<component base="six"/>
</outline>
<lib>
<dict>
<key>com.typemytype.robofont.mark</key>
<array>
<real>0.9058</real>
<real>0.9634</real>
<real>0.7395</real>
<real>1.0</real>
</array>
</dict>
</lib>
</glyph>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="three.tnum" format="1">
<advance width="1680"/>
<outline>
<component base="three"/>
</outline>
<lib>
<dict>
<key>com.typemytype.robofont.mark</key>
<array>
<real>0.9230863777</real>
<real>0.9647658846</real>
<real>0.7857136537</real>
<real>1.0</real>
</array>
</dict>
</lib>
</glyph>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="zero.tnum" format="1">
<advance width="1680"/>
<outline>
<component base="zero"/>
</outline>
<lib>
<dict>
<key>com.typemytype.robofont.mark</key>
<array>
<real>0.9230863777</real>
<real>0.9647658846</real>
<real>0.7857136537</real>
<real>1.0</real>
</array>
</dict>
</lib>
</glyph>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="zero.tnum.slash" format="1">
<advance width="1680"/>
<outline>
<component base="zero.slash"/>
</outline>
<lib>
<dict>
<key>com.typemytype.robofont.mark</key>
<array>
<real>0.9230863777</real>
<real>0.9647658846</real>
<real>0.7857136537</real>
<real>1.0</real>
</array>
</dict>
</lib>
</glyph>

View File

@ -4756,8 +4756,6 @@
<integer>256</integer> <integer>256</integer>
<key>one</key> <key>one</key>
<integer>128</integer> <integer>128</integer>
<key>seven.tnum</key>
<integer>256</integer>
</dict> </dict>
<key>infinity</key> <key>infinity</key>
<dict> <dict>
@ -5291,11 +5289,6 @@
<key>zeta</key> <key>zeta</key>
<integer>-137</integer> <integer>-137</integer>
</dict> </dict>
<key>seven.tnum</key>
<dict>
<key>idieresis</key>
<integer>256</integer>
</dict>
<key>sigma</key> <key>sigma</key>
<dict> <dict>
<key>@KERN_RIGHT_Alphagreek</key> <key>@KERN_RIGHT_Alphagreek</key>

View File

@ -705,6 +705,8 @@
<string>lari</string> <string>lari</string>
<string>zero</string> <string>zero</string>
<string>zero.slash</string> <string>zero.slash</string>
<string>zero.tnum</string>
<string>zero.tnum.slash</string>
<string>one</string> <string>one</string>
<string>one.1</string> <string>one.1</string>
<string>one.tnum</string> <string>one.tnum</string>
@ -713,19 +715,25 @@
<string>two.tnum</string> <string>two.tnum</string>
<string>twostroke</string> <string>twostroke</string>
<string>three</string> <string>three</string>
<string>three.tnum</string>
<string>four</string> <string>four</string>
<string>four.1</string> <string>four.1</string>
<string>four.tnum</string>
<string>four.tnum.1</string> <string>four.tnum.1</string>
<string>five</string> <string>five</string>
<string>five.tnum</string>
<string>Tonefive</string> <string>Tonefive</string>
<string>six</string> <string>six</string>
<string>six.1</string> <string>six.1</string>
<string>six.tnum</string>
<string>six.tnum.1</string> <string>six.tnum.1</string>
<string>seven</string> <string>seven</string>
<string>seven.tnum</string> <string>seven.tnum</string>
<string>eight</string> <string>eight</string>
<string>eight.tnum</string>
<string>nine</string> <string>nine</string>
<string>nine.1</string> <string>nine.1</string>
<string>nine.tnum</string>
<string>nine.tnum.1</string> <string>nine.tnum.1</string>
<string>ampersand</string> <string>ampersand</string>
<string>exclam</string> <string>exclam</string>
@ -2016,6 +2024,8 @@
<string>lari</string> <string>lari</string>
<string>zero</string> <string>zero</string>
<string>zero.slash</string> <string>zero.slash</string>
<string>zero.tnum</string>
<string>zero.tnum.slash</string>
<string>one</string> <string>one</string>
<string>one.1</string> <string>one.1</string>
<string>one.tnum</string> <string>one.tnum</string>
@ -2024,19 +2034,25 @@
<string>two.tnum</string> <string>two.tnum</string>
<string>twostroke</string> <string>twostroke</string>
<string>three</string> <string>three</string>
<string>three.tnum</string>
<string>four</string> <string>four</string>
<string>four.1</string> <string>four.1</string>
<string>four.tnum</string>
<string>four.tnum.1</string> <string>four.tnum.1</string>
<string>five</string> <string>five</string>
<string>five.tnum</string>
<string>Tonefive</string> <string>Tonefive</string>
<string>six</string> <string>six</string>
<string>six.1</string> <string>six.1</string>
<string>six.tnum</string>
<string>six.tnum.1</string> <string>six.tnum.1</string>
<string>seven</string> <string>seven</string>
<string>seven.tnum</string> <string>seven.tnum</string>
<string>eight</string> <string>eight</string>
<string>eight.tnum</string>
<string>nine</string> <string>nine</string>
<string>nine.1</string> <string>nine.1</string>
<string>nine.tnum</string>
<string>nine.tnum.1</string> <string>nine.tnum.1</string>
<string>ampersand</string> <string>ampersand</string>
<string>exclam</string> <string>exclam</string>

View File

@ -626,6 +626,30 @@ feature locl {
} locl; } locl;
@TNUM_L = [
zero one two three four five
six seven eight nine
one.1 four.1 six.1 nine.1
period comma
];
@TNUM_R = [
zero.tnum one.tnum two.tnum three.tnum four.tnum five.tnum
six.tnum seven.tnum eight.tnum nine.tnum
one.tnum.1 four.tnum.1 six.tnum.1 nine.tnum.1
period.tnum comma.tnum
];
feature tnum {
sub @TNUM_L by @TNUM_R;
} tnum;
feature zero {
sub zero by zero.slash;
sub zero.tnum by zero.tnum.slash;
} zero;
feature frac { # Fractions feature frac { # Fractions
# Latin # Latin
lookup frac_1 { lookup frac_1 {

View File

@ -386,8 +386,8 @@ manat
rupee rupee
lari lari
zero zero
zero.tnum
zero.slash zero.slash
zero.tnum
zero.tnum.slash zero.tnum.slash
one one
one.1 one.1
@ -400,6 +400,7 @@ three
three.tnum three.tnum
four four
four.1 four.1
four.tnum
four.tnum.1 four.tnum.1
five five
five.tnum five.tnum
@ -413,8 +414,8 @@ seven.tnum
eight eight
eight.tnum eight.tnum
nine nine
nine.tnum
nine.1 nine.1
nine.tnum
nine.tnum.1 nine.tnum.1
ampersand ampersand
exclam exclam