cornerstone icon indicating copy to clipboard operation
cornerstone copied to clipboard

Load other font weights and styles for the body-font

Open 2ndkauboy opened this issue 1 year ago • 2 comments

What?

Using a font name like Google_Karla_400 for body-font, it would only load the 400 font weight. When using Google_Karla_700 for another property, it would then load both the 400 and 700 fon weights. But since in CSS you could make something bold or italic, the font weight and/or style for this text might be missing, as it was not loaded automatically by using it in another property.

This PR will make sure that the most common font weights and font styles will be loaded for the body font.

Screenshots

The Karla font with font-weight: 400 rendered in bold - looks squashed: Karla-Font

The Karla font with font-weight: 700 rendered in bold - looks perfect: Karla-Font-700

2ndkauboy avatar Oct 11 '23 10:10 2ndkauboy

I wasn't able to (easily) find out, if the Montserrat font was also used in italic somewhere in CSS. But it might be a good idea to also load it in different styles, like this:

"headings-font": "Google_Montserrat_400,400i,500,500i,700,700i"

2ndkauboy avatar Oct 11 '23 10:10 2ndkauboy

hi @2ndkauboy , looks reasonable. can you please update CHANGELOG file also? thanks

BC-krasnoshapka avatar Oct 17 '23 09:10 BC-krasnoshapka