@zeaovede

По какой причине может не работать font-weight?

На сайте перестал работать font-weight. Работает только font-weight: 400. Свойство font-weight не реагирует ни на что другое. Пути указаны верно. Ранее font-weight отличающиеся от 400 работал и правок на этот счет не вносилось. Подключение выглядит вот так:
spoiler
@font-face {
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 400;

  /* Браузер сначала попробует найти шрифт локально */
  src: local("Roboto Condensed"),
       /* Если не получилось, загрузит woff2 */
       url("/wp-content/themes/eloboost-child/fonts/RobotoCondensed/RobotoCondensed-Regular.woff2") format("woff2"),
       /* Если браузер не поддерживает woff2, загрузит woff */
       url("/wp-content/themes/eloboost-child/fonts/RobotoCondensed/RobotoCondensed-Regular.woff") format("woff");
}


@font-face {
  font-family: "Roboto Condensed";
  font-style: italic;
  font-weight: 400;

  /* Браузер сначала попробует найти шрифт локально */
  src: local("Roboto Condensed"),
       /* Если не получилось, загрузит woff2 */
       url("/wp-content/themes/eloboost-child/fonts/RobotoCondensed/RobotoCondensed-Italic.woff2") format("woff2"),
       /* Если браузер не поддерживает woff2, загрузит woff */
       url("/wp-content/themes/eloboost-child/fonts/RobotoCondensed/RobotoCondensed-Italic.woff") format("woff");
}

@font-face {
  font-family: "Roboto Condensed";
  font-style: italic;
  font-weight: 300;

  /* Браузер сначала попробует найти шрифт локально */
  src: local("Roboto Condensed"),
       /* Если не получилось, загрузит woff2 */
       url("/wp-content/themes/eloboost-child/fonts/RobotoCondensed/RobotoCondensed-LightItalic.woff2") format("woff2"),
       /* Если браузер не поддерживает woff2, загрузит woff */
       url("/wp-content/themes/eloboost-child/fonts/RobotoCondensed/RobotoCondensed-LightItalic.woff") format("woff");
}


@font-face {
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 300;

  /* Браузер сначала попробует найти шрифт локально */
  src: local("Roboto Condensed"),
       /* Если не получилось, загрузит woff2 */
       url("/wp-content/themes/eloboost-child/fonts/RobotoCondensed/RobotoCondensed-Lightr.woff2") format("woff2"),
       /* Если браузер не поддерживает woff2, загрузит woff */
       url("/wp-content/themes/eloboost-child/fonts/RobotoCondensed/RobotoCondensed-Light.woff") format("woff");
}




@font-face {
  font-family: "Roboto Condensed";
  font-style: normal;
  font-weight: 700;

  /* Браузер сначала попробует найти шрифт локально */
  src: local("Roboto Condensed"),
       /* Если не получилось, загрузит woff2 */
       url("/wp-content/themes/eloboost-child/fonts/RobotoCondensed/RobotoCondensed-Bold.woff2") format("woff2"),
       /* Если браузер не поддерживает woff2, загрузит woff */
       url("/wp-content/themes/eloboost-child/fonts/RobotoCondensed/RobotoCondensed-Bold.woff") format("woff");
}

@font-face {
  font-family: "Roboto Condensed";
  font-style: italic;
  font-weight: 700;

  /* Браузер сначала попробует найти шрифт локально */
  src: local("Roboto Condensed"),
       /* Если не получилось, загрузит woff2 */
       url("/wp-content/themes/eloboost-child/fonts/RobotoCondensed/RobotoCondensed-BoldItalic.woff2") format("woff2"),
       /* Если браузер не поддерживает woff2, загрузит woff */
       url("/wp-content/themes/eloboost-child/fonts/RobotoCondensed/RobotoCondensed-BoldItalic.woff") format("woff");
}

/* Теперь можно использовать шрифт */


  * { font-family: 'Roboto Condensed' !important; }

Тестировал в гугле и опере, кэш чистил. А вот и сам сайт:
  • Вопрос задан
  • 110 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы