简体   繁体   English

无法以“浅”字号显示Google字体

[英]Unable to display google font in 'light' weight

I'm trying to use Merriweather from Google Fonts . 我正在尝试使用Google Fonts中的Merriweather

I'm able to use the regular and bold weights, but I cannot get the light weight to work. 我可以使用常规粗体重量,但是我无法使轻量级发挥作用。

In my <head> you can see that I am linking to all three weights: 在我的<head>您可以看到我正在链接到所有三个权重:

<link href="https://fonts.googleapis.com/css?family=Merriweather:300,400,700" rel="stylesheet">

However in my css the following does not seem to use a lighter font weight: 但是在我的css中,以下内容似乎并未使用较轻的字体粗细:

font-weight:300

Here is a CodePen with this problem: http://codepen.io/vivmaha/pen/XNLEoE 这是存在此问题的CodePen: http ://codepen.io/vivmaha/pen/XNLEoE

Aside — I wanted to embed the snip directly into SO, but I needed codepen to link to the google font 放在一边-我想将代码片段直接嵌入到SO中,但是我需要Codepen链接到Google字体

Turns out that this was because I had the font installed on my local OS. 原来这是因为我在本地操作系统上安装了字体。 The browser used the font from the OS instead of google's servers. 浏览器使用的是操作系统而非Google服务器的字体。 However the OS font didn't have the light weight installed. 但是,OS字体未安装轻字体。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM