无法解码下载的字体 - 部署的应用程序

时间:2015-11-20 22:01:07

标签: css amazon-web-services deployment fonts font-face

目前我在我的css文件中导入我的自定义字体如下:

<?php // 2.php
$getQuery = ""; // This is empty so it will redirect to 1 and show error message
session_start();
if(trim($getQuery) == ""){
    $ERROR = "no search criteria entered";

    $_SESSION['error'] = $ERROR;

    if(!isset($_SESSION['error'])) {
        die("the session error was not set for some reason");
    }
    $url = "1.php"; //index.php is page 1 in this case so I just redirect to the parent directory as index is loaded by default obviously in that case
    header("Location:" . $url);
}
?>

一切都在当地完美无缺。在我将应用程序部署到AWS之后,我在控制台中看到以下错误:

@font-face {
    font-family: 'Dinbek Light';
    src: url('./fonts/DINbek-Light.ttf') format('truetype');
}

我已经搜索过其他资源,但无法提出解决方案。请注意,我使用Grunt构建应用程序,并且可以识别字体文件路径,如“资源”选项卡中所示:

enter image description here

字体样式默认为Times New Roman。任何建议将不胜感激!

0 个答案:

没有答案