V
V
Violetta Morozova2017-03-24 11:25:27
Fonts
Violetta Morozova, 2017-03-24 11:25:27

Noto Serif Italic font not working for everyone in Safari?

I use the font Noto Serif Italic on the project. Works in all browsers, not in safari. I tried both the file received from the designer, and downloaded from the squirrel, and connected from googlefonts. Zero effect. I tried some other font - it works in safari.
I connect everything correctly, as well as other fonts that work. Even if I open the resources tab in the developer tool, other fonts are loaded there, but noto is not.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Violetta Morozova, 2018-07-22
@vilka_2009

The problem turned out to be that for Safari it is necessary not only to specify the font style in the font settings, but also in the place where you apply the font. For example:

@font-face {
  font-family: 'Noto Serif';
  src: url('<%= font_path "noto/NotoSerif-Italic.eot" %>');
  src: url('<%= font_path "noto/NotoSerif-Italic.eot" %>?#iefix') format('embedded- 
  opentype'),
  url('<%= font_path "noto/NotoSerif-Italic.woff2" %>') format('woff2'),
  url('<%= font_path "noto/NotoSerif-Italic.woff" %>') format('woff'),
  url('<%= font_path "noto/NotoSerif-Italic.ttf" %>') format('truetype'),
  url('<%= font_path "noto/NotoSerif-Italic.svg" %>') format('svg');
  font-weight: normal;
  font-style: italic;
}

div {
  font-family: 'Noto Serif';
  font-style: italic;
}

Here, with this use, the font will be displayed in safari.

M
Maxim Timofeev, 2017-03-24
@webinar

What format is the font in? How do you connect?
Safari eats .ttf, WOFF and svg starting from version 10
C, you can convert here:
https://www.fontsquirrel.com/tools/webfont-generator

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question