1
1
mirror of https://github.com/rsms/inter.git synced 2025-01-07 08:46:28 +03:00

Adds period and comma for tabular numbers feature

This commit is contained in:
Rasmus Andersson 2017-09-30 19:17:13 -07:00
parent 41f5c1f59f
commit 7dc293ad6a
11 changed files with 228 additions and 2 deletions

View File

@ -3,10 +3,12 @@ include(../features.fea);
@TNUM_L = [
zero one two three five six seven
four.1 six.1 nine.1
period comma
];
@TNUM_R = [
zero.tnum one.tnum two.tnum three.tnum five.tnum six.tnum seven.tnum
four.tnum.1 six.tnum.1 nine.tnum.1
period.tnum comma.tnum
];
feature tnum {

View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="comma.tnum" format="1">
<advance width="768"/>
<outline>
<contour>
<point x="592" y="348" type="line"/>
<point x="232" y="348" type="line"/>
<point x="232" y="28" type="line"/>
<point x="232" y="-188"/>
<point x="148" y="-304"/>
<point x="88" y="-428" type="curve"/>
<point x="312" y="-540" type="line"/>
<point x="472" y="-404"/>
<point x="592" y="-168"/>
<point x="592" y="56" type="curve"/>
</contour>
<contour>
<point x="620.0" y="364.0" type="move" name="_bottom"/>
</contour>
<contour>
<point x="312.0" y="48.0" type="move" name="_right"/>
</contour>
</outline>
<lib>
<dict>
<key>com.typemytype.robofont.guides</key>
<array>
<dict>
<key>angle</key>
<real>0.0</real>
<key>isGlobal</key>
<false/>
<key>magnetic</key>
<integer>5</integer>
<key>x</key>
<real>0.0</real>
<key>y</key>
<real>1238.875</real>
</dict>
<dict>
<key>angle</key>
<real>0.0</real>
<key>isGlobal</key>
<false/>
<key>magnetic</key>
<integer>5</integer>
<key>x</key>
<real>0.0</real>
<key>y</key>
<real>763.125</real>
</dict>
</array>
<key>com.typemytype.robofont.mark</key>
<array>
<real>0.94</real>
<real>0.94</real>
<real>0.94</real>
<real>1.0</real>
</array>
<key>interface.gridadjust.original</key>
<string>{'width': 737.0, 'leftMargin': 56, 'rightMargin': 175.0}</string>
</dict>
</lib>
</glyph>

View File

@ -622,6 +622,8 @@
<string>colontriangularmod.glif</string>
<key>comma</key>
<string>comma.glif</string>
<key>comma.tnum</key>
<string>comma.tnum.glif</string>
<key>commaabovecmb</key>
<string>commaabovecmb.glif</string>
<key>commaaboverightcmb</key>
@ -1380,6 +1382,8 @@
<string>percent.glif</string>
<key>period</key>
<string>period.glif</string>
<key>period.tnum</key>
<string>period.tnum.glif</string>
<key>periodcentered</key>
<string>periodcentered.glif</string>
<key>perispomenigreekcmb</key>

View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="period.tnum" format="1">
<advance width="768"/>
<outline>
<contour>
<point x="384" y="-28" type="curve" smooth="yes"/>
<point x="520" y="-28"/>
<point x="632" y="84"/>
<point x="632" y="224" type="curve" smooth="yes"/>
<point x="632" y="360"/>
<point x="520" y="472"/>
<point x="384" y="472" type="curve" smooth="yes"/>
<point x="248" y="472"/>
<point x="136" y="360"/>
<point x="136" y="224" type="curve" smooth="yes"/>
<point x="136" y="84"/>
<point x="248" y="-28"/>
</contour>
</outline>
<lib>
<dict>
<key>com.typemytype.robofont.guides</key>
<array>
<dict>
<key>angle</key>
<real>0.0</real>
<key>isGlobal</key>
<false/>
<key>magnetic</key>
<integer>5</integer>
<key>x</key>
<real>0.0</real>
<key>y</key>
<real>1238.875</real>
</dict>
<dict>
<key>angle</key>
<real>0.0</real>
<key>isGlobal</key>
<false/>
<key>magnetic</key>
<integer>5</integer>
<key>x</key>
<real>0.0</real>
<key>y</key>
<real>763.125</real>
</dict>
</array>
<key>com.typemytype.robofont.mark</key>
<array>
<real>0.94</real>
<real>0.94</real>
<real>0.94</real>
<real>1.0</real>
</array>
<key>interface.gridadjust.original</key>
<string>{'width': 842, 'leftMargin': 165, 'rightMargin': 185}</string>
</dict>
</lib>
</glyph>

View File

@ -534,7 +534,9 @@
<string>quotedblbase</string>
<string>quotesinglbase</string>
<string>comma</string>
<string>comma.tnum</string>
<string>period</string>
<string>period.tnum</string>
<string>ellipsis</string>
<string>colon</string>
<string>colon.case</string>
@ -2000,7 +2002,9 @@
<string>quotedblbase</string>
<string>quotesinglbase</string>
<string>comma</string>
<string>comma.tnum</string>
<string>period</string>
<string>period.tnum</string>
<string>ellipsis</string>
<string>colon</string>
<string>colon.case</string>

View File

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

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="comma.tnum" format="1">
<advance width="760"/>
<outline>
<contour>
<point x="540" y="256" type="line"/>
<point x="284" y="256" type="line"/>
<point x="284" y="64" type="line"/>
<point x="284" y="-88"/>
<point x="232" y="-228"/>
<point x="164" y="-388" type="curve"/>
<point x="364" y="-428" type="line"/>
<point x="468" y="-272"/>
<point x="536" y="-108"/>
<point x="540" y="68" type="curve"/>
</contour>
<contour>
<point x="420.0" y="308.0" type="move" name="_bottom"/>
</contour>
<contour>
<point x="152.0" y="100.0" type="move" name="_right"/>
</contour>
</outline>
<lib>
<dict>
<key>com.typemytype.robofont.mark</key>
<array>
<real>0.94</real>
<real>0.94</real>
<real>0.94</real>
<real>1.0</real>
</array>
<key>interface.width-adjustments</key>
<array>
<integer>-16</integer>
</array>
</dict>
</lib>
</glyph>

View File

@ -622,6 +622,8 @@
<string>colontriangularmod.glif</string>
<key>comma</key>
<string>comma.glif</string>
<key>comma.tnum</key>
<string>comma.tnum.glif</string>
<key>commaabovecmb</key>
<string>commaabovecmb.glif</string>
<key>commaaboverightcmb</key>
@ -1378,6 +1380,8 @@
<string>percent.glif</string>
<key>period</key>
<string>period.glif</string>
<key>period.tnum</key>
<string>period.tnum.glif</string>
<key>periodcentered</key>
<string>periodcentered.glif</string>
<key>perispomenigreekcmb</key>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<glyph name="period.tnum" format="1">
<advance width="760"/>
<outline>
<contour>
<point x="380" y="-28" type="curve" smooth="yes"/>
<point x="480" y="-28"/>
<point x="560" y="52"/>
<point x="560" y="152" type="curve" smooth="yes"/>
<point x="560" y="248"/>
<point x="480" y="328"/>
<point x="380" y="328" type="curve" smooth="yes"/>
<point x="284" y="328"/>
<point x="200" y="252"/>
<point x="200" y="152" type="curve" smooth="yes"/>
<point x="200" y="52"/>
<point x="280" y="-28"/>
</contour>
</outline>
<lib>
<dict>
<key>com.typemytype.robofont.mark</key>
<array>
<real>0.94</real>
<real>0.94</real>
<real>0.94</real>
<real>1.0</real>
</array>
<key>interface.width-adjustments</key>
<array>
<integer>-16</integer>
</array>
</dict>
</lib>
</glyph>

View File

@ -631,7 +631,9 @@
<string>quotedblbase</string>
<string>quotesinglbase</string>
<string>comma</string>
<string>comma.tnum</string>
<string>period</string>
<string>period.tnum</string>
<string>ellipsis</string>
<string>colon</string>
<string>colon.case</string>
@ -2093,7 +2095,9 @@
<string>quotedblbase</string>
<string>quotesinglbase</string>
<string>comma</string>
<string>comma.tnum</string>
<string>period</string>
<string>period.tnum</string>
<string>ellipsis</string>
<string>colon</string>
<string>colon.case</string>

View File

@ -335,7 +335,9 @@ quotedblright
quotedblbase
quotesinglbase
comma
comma.tnum
period
period.tnum
ellipsis
colon
colon.case