Web字体不显示某些字母

时间:2016-06-20 09:27:41

标签: fonts font-face webfonts

我对webfonts有一个很大的问题,特别是 - Pluto Sanslight Pluto Sansbold Pluto Sans Regular 。当我在计算机上安装.ttf文件时,我可以用立陶宛语写字母(ą,č,ę,ė,į,š,ų,ū,ž),一切看起来都很完美,但是当我用 @ font-face ,所有立陶宛字母都转换为普通字体,不是Pluto

有我的代码:

@font-face {
    font-family: 'pluto_sanslight';
    src: url('../fonts/plutosanslight-webfont.eot');
    src: url('../fonts/plutosanslight-webfont.eot?#iefix') format('embedded-opentype'),
         url('../fonts/plutosanslight-webfont.woff2') format('woff2'),
         url('../fonts/plutosanslight-webfont.woff') format('woff'),
         url('../fonts/plutosanslight-webfont.ttf') format('truetype'),
         url('../fonts/plutosanslight-webfont.svg#pluto_sanslight') format('svg');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'pluto_sansbold';
    src: url('../fonts/plutosansbold-webfont.woff2') format('woff2'),
         url('../fonts/plutosansbold-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'pluto_sans_regularregular';
    src: url('../fonts/plutosansregular-webfont.eot');
    src: url('../fonts/plutosansregular-webfont.eot?#iefix') format('embedded-opentype'),
         url('../fonts/plutosansregular-webfont.woff2') format('woff2'),
         url('../fonts/plutosansregular-webfont.woff') format('woff'),
         url('../fonts/plutosansregular-webfont.ttf') format('truetype'),
         url('../fonts/plutosansregular-webfont.svg#pluto_sans_regularregular') format('svg');
    font-weight: normal;
    font-style: normal;

}

2 个答案:

答案 0 :(得分:0)

您的网络服务器似乎无法正确提供字体文件。 您是否检查过浏览器控制台以查找404错误?

例如,路径url('../fonts/plutosanslight-webfont.eot');是否正确提供了所请求的资源?

字符以常用字体显示的原因可能是因为您指定了包含后备字体的字体系列。 请发布您的CSS代码,以便我们了解您如何指定font-family。

希望它有所帮助, 西蒙

答案 1 :(得分:0)

解决!

问题是,当我使用" Fontsquirrel"生成webfont时(https://www.fontsquirrel.com/tools/webfont-generator),我没有被选中自定义子集... 然后立陶宛语。那就是它。