Google Fonts Lining Numbers

2019-03-20 14:24发布

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?

1条回答
爷的心禁止访问
2楼-- · 2019-03-20 15:26

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";
}
查看更多
登录 后发表回答