我收到了警告:
无法解码下载的字体: 数据:应用程序/字体WOFF;字符集= UTF-8; BASE64,d09GRgABAAAAABIYAA0AAAAAG5gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAR / AAAABoAAAAcgngKt0dERUYAABHgAAAAHAAAAB4AJwAYT1MvMgAAAZgAAABCAAAAYA8yHPpjbWFwAAACGAAAAIoAAAHGpyaHlWdhc3AAABHYAAAACAAAAAgAAAAQZ2x5ZgAAAswAAA3QAAAVCGGGcXVoZWFkAAABMAAAAC4AAAA2FTIoLGhoZWEAAAFgAAAAIAAAACQNAwkTaG10eAAAAdwAAAA8AAAARja6AU9sb2NhAAACpAAAACYAAAAmI4odrG1heHAAAAGAAAAAGAAAACAAGwGbbmFtZQAAEJwAAADcAAABm / pYTdhwb3N0AAAReAAAAF4AAAC9IEs0anjaY2BkAANfW9Z18fw2Xxm4WcD8a5kfr8Po / 3 / + 7 + d0YT4E5HIwMIFEAVg ... TkwHjadc6xasJQGMXxfzRatCCdSul0R6eg4AN0KnVw6SAdG + MlBPReiBF07yN07DP0YXwiT8K3JnDD7zs35yPAjH8S2ifhgSfzQJ6bh / KbOZW / zCMeuZjHyn / NU165qZWkEyWzbkPrgfxiHsoLcyp / mEc8820eK / 8xT1nxR0VB5KgTCVAV8Rij8Imn5MyBnFqjL8 + HXOj7vi / FAK / NSfdt7liS6S / Z + vpUxeCW2aK / + + 97njvqltoruu67zs1e246r3uuturjupfepjsh98ntd 73zxty7irvsy7uxbpkn42n3ksw5aqbre0vft / xcr0Wj0kIS9mJj1 / hFl6k5OUilR8l8jAiUKnnjwESBEhBgJUmTIUaBEhTpy59HeUf3YrcY8bvbdbzXtaE8H + v1HOtGZWrqETu + 9hs7zoydzaaaaaqab // 8ad3jay2bkygdgawixigziyarcqsbmafmyaarzaeb42mngygbkaikr s9q5qps1zi / XYTQARxsHuAAA
尝试加载base64编码的自定义字体时。
我正在使用弹出的create-react-app。
向我的src
媒体资源添加格式('woff')
@font-face {
font-family: 'custom-icon_map';
src: url(data:application/font-woff;charset=utf-8;base64,blahBLAHblah) format('woff');
font-style: normal;
font-weight: 400;
}
这将取消警告,但我的问题仍然没有解决,因为我的图标不会在本地加载。但是,当应用程序部署到生产环境时,图标加载正常。
有什么想法吗?