使用“真棒”字体,但字体不流畅

时间:2019-07-27 08:29:45

标签: css font-awesome

我正在此页面上使用“真棒”。

但是文本仍然看起来不流畅:

enter image description here

在此站点上,很顺利: https://www.yang2020.com/events/

要让它变得如此平稳,我缺少什么? enter image description here

两个页面都有font-family: 'Awesome Font', sans-serif

1 个答案:

答案 0 :(得分:2)

这是因为您提到的页面(有效的页面)具有

中定义的字体
  

https://www.yang2020.com/wp-content/themes/aspire-pro/AvenirNext/avenir_next.css?ver=1.2


您需要定义字体才能像在CSS中那样使用它

@font-face {
  font-family: 'Awesome Font';
  font-style: normal;
  font-weight: 700;
  src: local('Awesome Font Bold'),
       url('/wp-content/themes/aspire-pro/AvenirNext/font-files/AvenirNextLTPro-Bold.ttf') format('truetype');
}

@font-face {
  font-family: 'Awesome Font';
  font-style: italic;
  font-weight: 700;
  src: local('Awesome Font Bold Italic'),
       url('/wp-content/themes/aspire-pro/AvenirNext/font-files/AvenirNextLTPro-BoldIt.ttf') format('truetype');
}

@font-face {
  font-family: 'Awesome Font';
  font-style: normal;
  font-weight: 600;
  src: local('Awesome Font DemiBold'),
       url('/wp-content/themes/aspire-pro/AvenirNext/font-files/AvenirNextLTPro-Demi.ttf') format('truetype');
}

@font-face {
  font-family: 'Awesome Font';
  font-style: italic;
  font-weight: 600;
  src: local('Awesome Font DemiBold Italic'),
       url('/wp-content/themes/aspire-pro/AvenirNext/font-files/AvenirNextLTPro-DemiIt.ttf') format('truetype');
}

@font-face {
  font-family: 'Awesome Font';
  font-style: normal;
  font-weight: 900;
  src: local('Awesome Font Heavy'),
       url('/wp-content/themes/aspire-pro/AvenirNext/font-files/AvenirNextLTPro-Heavy.ttf') format('truetype');
}

@font-face {
  font-family: 'Awesome Font';
  font-style: italic;
  font-weight: 900;
  src: local('Awesome Font Heavy Italic'),
       url('/wp-content/themes/aspire-pro/AvenirNext/font-files/AvenirNextLTPro-HeavyIt.ttf') format('truetype');
}

@font-face {
  font-family: 'Awesome Font';
  font-style: italic;
  font-weight: 400;
  src: local('Awesome Font Italic'),
       url('/wp-content/themes/aspire-pro/AvenirNext/font-files/AvenirNextLTPro-It.ttf') format('truetype');
}

@font-face {
  font-family: 'Awesome Font';
  font-style: normal;
  font-weight: 300;
  src: local('Awesome Font Light'),
       url('/wp-content/themes/aspire-pro/AvenirNext/font-files/AvenirNextLTPro-Light.ttf') format('truetype');
}

@font-face {
  font-family: 'Awesome Font';
  font-style: italic;
  font-weight: 300;
  src: local('Awesome Font Light Italic'),
       url('/wp-content/themes/aspire-pro/AvenirNext/font-files/AvenirNextLTPro-LightIt.ttf') format('truetype');
}

@font-face {
  font-family: 'Awesome Font';
  font-style: normal;
  font-weight: 500;
  src: local('Awesome Font Medium'),
       url('/wp-content/themes/aspire-pro/AvenirNext/font-files/AvenirNextLTPro-Medium.ttf') format('truetype');
}

@font-face {
  font-family: 'Awesome Font';
  font-style: italic;
  font-weight: 500;
  src: local('Awesome Font Medium Italic'),
       url('/wp-content/themes/aspire-pro/AvenirNext/font-files/AvenirNextLTPro-MediumIt.ttf') format('truetype');
}

@font-face {
  font-family: 'Awesome Font';
  font-style: normal;
  font-weight: 400;
  src: local('Awesome Font'),
       url('/wp-content/themes/aspire-pro/AvenirNext/font-files/AvenirNextLTPro-Regular.ttf') format('truetype');
}