C
C
Captain Cocoa2016-09-22 15:04:38
css
Captain Cocoa, 2016-09-22 15:04:38

Neponyatk with Google fonts, why doesn't it work everywhere?

Guys, in short, I made up the page as usual, connected Open Sans with Google fonts, everything works great.
But suddenly one person says that he has a standard miserable font, throws a screen, and it's true.
We start testing it on different PCs around the office, and we find that the font works on some PCs, but not on others.
It doesn't really depend on the browser though. Since it works for me even in IE, and for some it doesn’t even work in chrome.
What could be the problem, can anyone come across?
In general, if they connect to the header via a link, then it works

<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,800&subset=cyrillic" rel="stylesheet">

If connected via CSS, it does not work.
@import 'https://fonts.googleapis.com/css?family=Open+Sans:400,700,800&subset=cyrillic';

Answer the question

In order to leave comments, you need to log in

6 answer(s)
I
iBird Rose, 2016-09-22
@RadCor

you accurately normally connect these fonts. It could just be that you don't connect them. but since you have open sans on your computer, it opens it. tobish and the rest - who has a font on their computer - opens normally

A
archelon, 2016-09-22
@archelon

it also happens: the site is via https, and the font is via http.
then the browser does not download it.

A
Alexey Sirotkin, 2016-09-22
@alexeisirotkin

With Google fonts woff/woff2 is usually included.
In general, I have been connecting fonts for a long time and with conviction like this in style.css:
@font-face {
font-family: 'Open Sans';
font-style: normal
font-weight: 400
src: local('Open Sans'), local('OpenSans'), url( http://domain/fonts/opensans.woff2) format('woff2'), url( http://domain/fonts/opensans. woff) format('woff');
}

D
Dmitry Melnik, 2016-09-22
@rdd

Don't rely on third party servers, upload your own fonts, keep dependencies to a minimum.
Here:
https://webfont.ru/font/open-sans
And rejoice

X
xtala zen, 2016-09-22
@xtala

For different versions of browsers and operating systems, the ttf format font is not always suitable (unless, of course, you just registered it), it happens that the font needs to be slipped into the browser in other formats, such as woff or eot. For IE older versions generally use the fix. In your case, it probably makes sense to download the webpack of this font and load it from a local folder without contacting Google servers. For example, here https://www.fontsquirrel.com/fonts/open-sans , the manual clearly describes what properties to prescribe in CSS. True, everything is in English, but it is primitive there.

K
KurtsKhalia, 2016-09-22
@KurtsKhalia

In my practice, too, it often doesn’t work at all through importing into css, most likely it doesn’t work for you either everywhere, it’s just that open sans is installed on some computers. I myself always connect through the header, Google does not give an explanation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question