KyleAMathews / typefaces

NPM packages for Open Source typefaces
2.6k stars 92 forks source link

Enable font-variant-numeric: tabular-nums; for Exo 2 #62

Open dotnetCarpenter opened 6 years ago

dotnetCarpenter commented 6 years ago

As the title suggest, I only know this to be an issue with Exo 2 but it might impact all fonts - I dunno.

The issue is when you have changing numbers, the width of the numbers will change and create a undesirable width flickering. 111 does not take up the same width as 888.

font-variant-numeric: tabular-nums; to the rescue!

Only, that doesn't work with the Exo 2 version in this repo or the one on google fonts. So I contacted the creator, Natanael Gama and he assured me that it was in his fonts in the OTF version. I downloaded the font from his website and did a conversion on font squirrel and low and behold, it was working!

So I'm interested in creating a PR to update the woff files in this repo but want to know what settings are used. Basically, I would like to make the woff files as small as possible while keeping backwards compatibility. OpenType Features and OpenType Flattening are the most interesting points. I could select only tnum and ligo as OpenType Features or select all features and do some flattening. What are the options used for fonts in this repo?

Here is a screen shot of the options I'm looking at:

screen shot 2018-03-19 at 16 09 38

dotnetCarpenter commented 6 years ago

I just published a temporary package, until this issue is resolved. https://www.npmjs.com/package/@dotnetcarpenter/typeface-exo-2