Mobile Firefox 和 Chrome 无法识别 @font-face

Mobile Firefox and Chrome not recognizing @font-face

我在我的网站上使用了一种特定的字体。 Firefox 和 Chrome 在 PC 上(本地和服务器)识别它,但在移动设备上(Firefox 和 Chrome)不识别它。我在 CSS 文件中使用 @font-face。

我在服务器上上传了字体。我不知道该尝试什么,因为它确实可以在计算机上运行。非常感谢任何帮助。

这是我的 HTML:

 <div class="welcome">WELCOME</div><div class="home">HOME</div>

这是我的 CSS:

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

.welcome {
    width: 47%;
    padding: 0;
    margin: 0 auto;
    font-family: 'typographicaregular', sans-serif;
    font-size: .7em;
    letter-spacing: 26px;
    text-align: center;
    color: #004391;
}
.home {
    width: 85%;
    padding: 0;
    margin: -40px auto 0;
    font-family: 'typographicaregular', sans-serif;
    letter-spacing: 12px;
    font-weight: bold;
    font-size: 1.6em;
    text-align: center;
    color: #004391;
}

它应该显示我的 Android phone 和 iPad 上的实际字体,而不是通用的 san-serif 字体。

这似乎与以下内容重复:@font-face Not Working in Chrome for Android

问题可能与您的 font-family 声明有关(我无法判断,因为您尚未发布该部分)。例如,如果你有这个:

font-family: fghjkjh, 'jump_startregular', sans-serif;

...Chrome for Android 会简单地假装安装了 fghjkjh(但实际上使用默认的 Android 字体)并忽略其他所有内容。 (不确定这是错误还是功能。)

在这种情况下,解决方案是将 'jump_startregular' 移到前面 - 并可能将 local 源添加到 @font-face 块,这可能会导致其他较旧的问题浏览器。

"Taken word for word from the link mention above"

如果这不起作用,我建议您改用 google 字体。