Failed to decode downloaded font, OTS parsing error: invalid version tag + rails 4

后端 未结 25 1553
长发绾君心
长发绾君心 2020-12-04 11:46

I am doing assets pre-compile, and running the application in production mode. After compilation when I load the my index page I got followings warnings in the chrome consol

25条回答
  •  情书的邮戳
    2020-12-04 12:25

    For angular-cli and webpack users I suspected that there is some issue while importing the fonts in css file , so please also provide url location encoded with single quotes as following -

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

    This post might be old , but this is the solution which worked for me .

提交回复
热议问题