I'm using the Raleway font and Google Font's description says that "the download features both old style and lining numerals".
I can't find any documentation that says how to line numerals. Does anyone know how I can go about doing this?
To answer my own question:
First I had to add &subset=all
as a parameter for the Google font:
<link href="http://fonts.googleapis.com/css?family=Raleway:400,100,200,300,500,600,700&subset=all" rel="stylesheet" type="text/css">
Then I just added this CSS:
body {
font-family: "Raleway", Arial, sans-serif;
-webkit-font-feature-settings: "lnum";
-moz-font-feature-settings: "lnum";
-ms-font-feature-settings: "lnum";
-o-font-feature-settings: "lnum";
font-feature-settings: "lnum";
}
Chrome 54.0.2840.71 (Official Build) m (64-bit)
on Windows 10.
Nov 12, 2016 at 1:33
This is a old post but it's a relevant problem with this kind of fonts.
I just solved this problem using the Expert mode on https://www.fontsquirrel.com/tools/webfont-generator
Upload the Raleway fonts, scroll down to "OpenType flattening" and select "Lining numerals" and after click "Download your kit". Enjoy your font with the proper lining.