简体   繁体   English

谷歌的Open Sans字体重量

[英]Google's Open Sans font weight

I am using Google Open Sans fonts in an html page via: 我通过以下方式在html页面中使用Google Open Sans字体:

<link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">

Only the font-weight: 600; 只有font-weight: 600; makes the font bold. 使字体变粗。 Other values don't seem to make a difference. 其他值似乎没有什么区别。 How to have intermediary font weights for this particular font using the CSS rules? 如何使用CSS规则获得此特定字体的中间字体权重? Or must I use some other font? 或者我必须使用其他字体吗?

What you are using will only consist of 400 font weight font file. 您使用的只包含400字体权重字体文件。 Inorder to get other font weight font files, you need to select font weights as well, like 为了获得其他字体粗细字体文件,您还需要选择字体粗细,例如

@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700');

Note that the more font weights you use, the more time it will take to load these files. 请注意,您使用的字体权重越多,加载这些文件所需的时间就越多。 Inorder to add more font weights, follow the steps below. 要添加更多字体粗细,请按照以下步骤操作。

  1. Go to Open Sans font page and click on Select This Font option 转到Open Sans字体页面,然后单击选择此字体选项 在此输入图像描述
  2. Maximize the box on the footer, and click on Customize 最大化页脚上的框,然后单击“ 自定义”

在此输入图像描述

  1. Now here, select the font weights you would like to select for this font. 现在,在此处选择要为此字体选择的字体粗细。 And you are done, go back to Embed and get the new URL. 你完成了,回到嵌入并获得新的URL。

在此输入图像描述

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

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