WordPress自定义字体问题!

时间:2016-04-06 作者:Momin

我在我的网站上添加了自定义字体!Its基于Genesis框架。超过15天的网页字体到处显示,突然字体丢失,但我在CSS上签出我的字体链接和字体减速没关系!

@font-face { font-family: \'GothamRounded-Bold\'; src: url(\'mountnow.com/wp-content/themes/centric-pro/fonts/GothamRounded-Bold.eot?#iefix\') format(\'embedded-opentype\'), url(\'http://mountnow.com/wp-content/themes/centric-pro/fonts/GothamRounded-Bold.otf\') format(\'opentype\'), url(\'http://mountnow.com/wp-content/themes/centric-pro/fonts/GothamRounded-Bold.woff\') format(\'woff\'), url(\'http://mountnow.com/wp-content/themes/centric-pro/fonts/GothamRounded-Bold.ttf\') format(\'truetype\'), url(\'http://mountnow.com/wp-content/themes/centric-pro/fonts/GothamRounded-Bold.svg#GothamRounded-Bold\') format(\'svg\'); font-weight: normal; font-style:normal; }

我不知道为什么会这样?Google Chrome Inspect elements screenshot

1 个回复
最合适的回答,由SO网友:Phaze Phusion 整理而成

在内容/主题/中心专业/风格中。css,从第88行删除到第113行这将删除所有字体声明。

在第88行粘贴以下内容:

@font-face {
  font-family: \'GothamRounded-Bold\';
  font-style: normal;
  font-weight: 400;
  src: url(\'fonts/GothamRounded-Bold.eot\') format(\'embedded-opentype\'),
       url(\'fonts/GothamRounded-Bold.otf\') format(\'opentype\'),
       url(\'fonts/GothamRounded-Bold.woff\') format(\'woff\'), 
       url(\'fonts/GothamRounded-Bold.ttf\') format(\'truetype\'), 
       url(\'fonts/GothamRounded-Bold.svg#GothamRounded-Bold\') format(\'svg\');
}

@font-face {
  font-family: \'GothamRounded-Light\';
  font-style: normal;
  font-weight: 400;
  src: url(\'fonts/GothamRounded-Light.eot\') format(\'embedded-opentype\'),
       url(\'fonts/GothamRounded-Light.otf\') format(\'opentype\'),
       url(\'fonts/GothamRounded-Light.woff\') format(\'woff\'),
       url(\'fonts/GothamRounded-Light.ttf\')  format(\'truetype\'), 
       url(\'fonts/GothamRounded-Light.svg#GothamRounded-Light\') format(\'svg\');
}

@font-face {
  font-family: \'GothamRounded-Medium\';
  font-style: normal;
  font-weight: 400;
  src: url(\'fonts/GothamRounded-Medium.eot\') format(\'embedded-opentype\'), 
       url(\'fonts/GothamRounded-Medium.otf\')  format(\'opentype\'),
       url(\'fonts/GothamRounded-Medium.woff\') format(\'woff\'),
       url(\'fonts/GothamRounded-Medium.ttf\')  format(\'truetype\'),
       url(\'fonts/GothamRounded-Medium.svg#GothamRounded-Medium\') format(\'svg\');
}
在内容/主题/中心pro/自定义中,将字体视为区分大小写。css第5行更改:

font-family: "Gothamrounded-medium";

font-family: "GothamRounded-Medium";