-1

I created a simple article page that uses the Google font, Montserrat for the article's main title. I set the font weight to 700 to make the title appear bold but when displayed on the page, it doesn't appear nearly as bold as it should (compared to the font reference). Here's a link to the sample page I made that illustrates the problem:

https://www.juicehouse.org/ohio-brain-drain.html

Jason O
  • 753
  • 9
  • 28
  • Did you use the html that google generates for you? Yours looks different to what they say to use. `family=Montserrat:wght@700;900` – dantheman Feb 09 '23 at 14:28
  • 1
    Please add meaningful code and a problem description here. Don't just link to the site that needs fixing — otherwise, this question will lose any value to future visitors once the problem is solved or if the site you're linking to is inaccessible. Posting a [Minimal, Reproducible example (or MCVE)](https://stackoverflow.com/help/minimal-reproducible-example) that demonstrates your problem would help you get better answers. For more info, see [Something on my web site doesn't work. Can I just paste a link to it?](https://meta.stackexchange.com/questions/125997/) Thanks! – j08691 Feb 09 '23 at 14:41

1 Answers1

1

I think you are using an outdated format on your link to import the font, as I see in the example you are using the following:

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

But now the way to specify the weight is different:

<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&display=swap" rel="stylesheet">

Live demo:

.w700{
  font-family: 'Montserrat';
  font-weight: 700;
}

.w900{
  font-family: 'Montserrat';
  font-weight: 900;
}
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&display=swap" rel="stylesheet">

<p class="w700">font-weight: 700</p>
<p class="w900">font-weight: 900</p>
Diego D
  • 6,156
  • 2
  • 17
  • 30
  • 1
    I hope you don't mind if I added a live snippet of what you suggested in your answer. Just to show the evidence. The answer you have given was correct – Diego D Feb 09 '23 at 14:54