I want to use Montserrat with a font-weight of 200 exactly like they have on the image text on this website: http://www.cohabs.com/
我想要使用蒙特塞拉特的字体,它的字数是200,就像他们在这个网站上的图片一样:http://www.cohabs.com/。
I have the font working using this method
我有使用这种方法的字体。
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
and
和
h1 {
font-family: 'Montserrat', sans-serif;
font-weight: 200;
}
But the font weight can only be regular or bold according to google fonts, so where/how did that website use it with a font-weight of 200?
但是,根据谷歌字体,字体的重量只能是普通的或粗体的,那么,该网站在哪里/如何使用它的字体重量为200?
3 个解决方案
#1
1
it seems like they are loading font from their server
看起来他们是从服务器加载字体。
go to their main.css
and ctrl+f url(../assets/fonts/montserrat-light.woff)
u'll see ur self
去他们的主要。css和ctrl+f url(../assets/字体/montserrat-light.woff)你会看到你自己。
you can find same font here, u can also load it from ur server if needed
你可以在这里找到相同的字体,如果需要的话,你也可以从你的服务器上下载。
to use any font which u want to host on server, u need to download that font and host it to ur server I suggest to place them in fonts
folder and refer below code
要使用你想要在服务器上运行的任何字体,你需要下载该字体并将其托管到你的服务器上,我建议将它们放置在字体文件夹中,并参考下面的代码。
you can replace lovelyFont
with ur own font name
你可以用你自己的字体名来替换lovelyFont。
@font-face {
font-family: 'lovelyFont';
src: url(../'fonts/lovely_font.eot');
src:
local('lovelyFont'),
local('lovelyFont'),
url('fonts/lovelyFont.otf')
format('opentype');
}
div { font-family: 'lovelyFont', sans-serif; }
for more details refer this or this links
有关更多细节,请参考这个或这个链接。
#2
2
Montserrat light version isn't available on Google Fonts. Google Fonts only has 'Regular' and 'Bold' version of Montserrat.
在谷歌字体中没有Montserrat light版本。谷歌字体只有“Regular”和“Bold”的Montserrat。
You can download more Montserrat types here: https://www.fontsquirrel.com/fonts/montserrat
您可以在这里下载更多的Montserrat类型:https://www.fontsquirrel.com/fonts/montserrat。
#3
0
They are using Montserrat Hairline font for the thin letters.
他们正在用蒙特塞拉特细线字体来处理这些薄字母。
#1
1
it seems like they are loading font from their server
看起来他们是从服务器加载字体。
go to their main.css
and ctrl+f url(../assets/fonts/montserrat-light.woff)
u'll see ur self
去他们的主要。css和ctrl+f url(../assets/字体/montserrat-light.woff)你会看到你自己。
you can find same font here, u can also load it from ur server if needed
你可以在这里找到相同的字体,如果需要的话,你也可以从你的服务器上下载。
to use any font which u want to host on server, u need to download that font and host it to ur server I suggest to place them in fonts
folder and refer below code
要使用你想要在服务器上运行的任何字体,你需要下载该字体并将其托管到你的服务器上,我建议将它们放置在字体文件夹中,并参考下面的代码。
you can replace lovelyFont
with ur own font name
你可以用你自己的字体名来替换lovelyFont。
@font-face {
font-family: 'lovelyFont';
src: url(../'fonts/lovely_font.eot');
src:
local('lovelyFont'),
local('lovelyFont'),
url('fonts/lovelyFont.otf')
format('opentype');
}
div { font-family: 'lovelyFont', sans-serif; }
for more details refer this or this links
有关更多细节,请参考这个或这个链接。
#2
2
Montserrat light version isn't available on Google Fonts. Google Fonts only has 'Regular' and 'Bold' version of Montserrat.
在谷歌字体中没有Montserrat light版本。谷歌字体只有“Regular”和“Bold”的Montserrat。
You can download more Montserrat types here: https://www.fontsquirrel.com/fonts/montserrat
您可以在这里下载更多的Montserrat类型:https://www.fontsquirrel.com/fonts/montserrat。
#3
0
They are using Montserrat Hairline font for the thin letters.
他们正在用蒙特塞拉特细线字体来处理这些薄字母。