Reputation: 1452
I want my @font-face to apply to a range, of, say, 0 to 400 font-weight values. It appears that my @font-face applies only to the explicit font-weight specified in it. For example:
@font-face {
font-family: 'Roboto';
src: url('Roboto/Roboto-Bold.tff');
font-weight: 200;
}
If I used:
span { font-weight: 201; font-family: 'Roboto';}
It doesn't apply.
Upvotes: 2
Views: 1410
Reputation: 352
Saw an article in MDN
@font-face {
font-family: 'Manrope';
font-display: auto;
font-style: normal;
font-weight: 400 600;
src: url('URL');
}
https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-weight
Upvotes: 1
Reputation: 627
@font-face {
font-family: Roboto;
src: url(../fonts/Roboto-Bold.eot);
src: url(../fonts/Roboto-Bold.eot?#iefix) format('embedded-opentype'), url(../fonts/Roboto-Bold.woff) format('woff'), url(../fonts/Roboto-Bold.ttf) format('truetype');
font-weight: 700;
font-style: normal;
}
body {
font-family: Roboto, Arial; font-weight: 100;}
Upvotes: 0
Reputation: 3905
try to remove the single quote :
@font-face {
font-family: Roboto;
src: url(Roboto/Roboto-Bold.tff);
font-weight: 200;
}
span { font-weight: 200; font-family: Roboto;}
Upvotes: 0