반응형
리소스가 글꼴로 해석되지만 MIME 유형 application / x-font-woff로 전송 됨
qooxdoo 문서 의 웹 글꼴 자습서 를 따라 Font.js에 웹 글꼴을 추가했지만 Chrome의 개발자 콘솔에 경고가 있음을 알았습니다.
내 코드는 다음과 같습니다.
/* ************************************************************************
#asset(myApp/fonts/*)
************************************************************************ */
qx.Theme.define("myApp.theme.Font",
{
extend : qx.theme.simple.Font,
fonts :
{
"silkscreen" :
{
size: 8,
lineHeight: 1,
family: [ "silkscreen", "Tahoma" ],
sources:
[
{
family: "Silkscreen",
source:
[
"myApp/fonts/slkscr-webfont.eot",
"myApp/fonts/slkscr-webfont.ttf",
"myApp/fonts/slkscr-webfont.woff",
"myApp/fonts/slkscr-webfont.svg#silkscreen"
]
}
]
}
}
});
브라우저 경고를 어떻게 해결할 수 있습니까?
W3C 사양 에 따르면 올바른 MIME 유형은입니다 application/font-woff
. 따라서 .woff 파일을 제공 할 때이를 사용하도록 웹 서버를 구성해야합니다.
IIS 웹 서버를 사용하는 경우 다음을 시도해보십시오.
<system.webServer>
<staticContent>
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
</staticContent>
</system.webServer>
반응형
'IT TIP' 카테고리의 다른 글
cmd.exe (배치) 스크립트의 배열, 연결 목록 및 기타 데이터 구조 (0) | 2020.12.09 |
---|---|
ArrayList에서 요소의 모든 발생 제거 (0) | 2020.12.09 |
Apache http 서버에 mod_proxy 설정 (0) | 2020.12.09 |
MongoDB "루트"사용자 (0) | 2020.12.09 |
typeof는 연산자이자 함수입니다. (0) | 2020.12.09 |