I am having trouble using Roboto fonts in the Chrome browser.. specifically I can't seem to get Condensed and Thin/Light, etc. font weights. I download all 3 complete fonts:
@import url(https://fonts.googleapis.com/css?family=Roboto:100,100italic,300,300italic,400,400italic,500,500italic,700,700italic,900,900italic&subset=latin,latin-ext,cyrillic,cyrillic-ext,greek-ext,greek,vietnamese);
@import url(https://fonts.googleapis.com/css?family=Roboto+Condensed:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext,cyrillic-ext,cyrillic,greek-ext,greek,vietnamese);
@import url(https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,latin-ext,greek-ext,greek,vietnamese,cyrillic,cyrillic-ext);
then I use them in declarations like:
Roboto Condensed
.mas-1st-col {
font-family: Roboto !important;
font-size: 8pt; !important
font-weight: 200 !important;
font-stretch: condensed !important;
}
Roboto Light
span.f, div.f.kv + div.f.slp {
font-family: Roboto !important;
font-size: 8pt !important;
font-weight: 200 !important;
}
However, what it gives me is plain Roboto. If I change the "Condensed" one to use font-family "Roboto Condensed" it works ... and that makes sense because apparently chrome is late to adopt font-stretch
. However, changing the font-family to "roboto condensed" doesn't use the lighter font-weight
(which is 300), it stays at 400. Even if I change the font-weight
to 300, which it specifically has, it will remain at 400 (switching in the console between 200, 300 and 400 has no effect at all). I have to put "Roboto Condensed Light" specifically, to get the light font-weight.
And what about the others? "Roboto Thin" wasn't specifically downloaded or set in a @font-face
... I shouldn't have to use names like "roboto thin" when I just want a font-weight, should I?
Details
Because of Terry's great suggestion, here's the relevant code basically in it's entirety:
function _miscCSS () {
var css = function(){/*
@import url(https://fonts.googleapis.com/css?family=Roboto:100,100italic,300,300italic,400,400italic,500,500italic,700,700italic,900,900italic&subset=latin,latin-ext,cyrillic,cyrillic-ext,greek-ext,greek,vietnamese);
@import url(https://fonts.googleapis.com/css?family=Roboto+Condensed:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext,cyrillic-ext,cyrillic,greek-ext,greek,vietnamese);
@import url(https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,latin-ext,greek-ext,greek,vietnamese,cyrillic,cyrillic-ext);
...[css declarations follow]...
*/}.toString().slice(14,-3);
return css;
}
var misc_css = '<style>'+ _miscCSS() +'</style>';
jQ(misc_css).appendTo('head');