S
S
Seanyr2020-06-16 13:49:57
css
Seanyr, 2020-06-16 13:49:57

Does it make sense to specify the font weight in styles if only one is added to font-face?

For example, in font-face , a font of only a certain thickness (other than Regular) is included:

@font-face {
  font-family: 'Spectral';
  font-style: normal;
  font-weight: 200;
  src: local('Spectral ExtraLight'), local('Spectral-ExtraLight'),
            url('/fonts/Spectral/Spectral-ExtraLight.woff2') format('woff2'),
            url('/fonts/Spectral/Spectral-ExtraLight.woff') format('woff');
}

As far as I know, the default font-weight is 400, but in the absence of the desired weight, the one closest to it is used. This means that if you do not specify it, 200 will still be used.
In this case, does it make sense when styling elements using this font to re-specify their font-weight?
If yes, then why?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lynn "Coffee Man", 2020-06-16
@Seanyr

There's a meaning.
If for some reason the browser does not load your font, it will use some system font and apply the specified font-weight to it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question