久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

FontAwesome 無法在本地和電子應用程序中加載字體

FontAwesome fails to load fonts locally and in electron app(FontAwesome 無法在本地和電子應用程序中加載字體)
本文介紹了FontAwesome 無法在本地和電子應用程序中加載字體的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我已經使用 npm 下載了 FontAwesome,然后使用 grunts 復制任務將 css 文件和字體復制到我的電子應用程序根目錄中的正確文件夾中.

I have downloaded FontAwesome using npm and then copied the css-file and the fonts into the right folders in the root-diretory of my electron-application using grunts copy task.

到目前為止一切順利.一切都在它應該在的地方.

So far so good. Everything is where it is supposed to be.

現在,當我在我的應用程序中引用 FontAwesome 時,圖標不會被加載.這些是我在控制臺中遇到的錯誤:

Now, when i am referencing FontAwesome in my app, the icons do not get loaded. These are the errors that I get in the console:

解碼下載的字體失敗:
file:///path/to/fonts/fontawesome-webfont.woff2?v=4.4.0
OTS 解析錯誤:無法將 WOFF 2.0 字體轉換為 SFNT

Failed to decode downloaded font:
file:///path/to/fonts/fontawesome-webfont.woff2?v=4.4.0
OTS parsing error: Failed to convert WOFF 2.0 font to SFNT

解碼下載的字體失敗:
file:////path/to/fonts/fontawesome-webfont.woff?v=4.4.0
OTS 解析錯誤:WOFF 標頭中的文件大小不正確

Failed to decode downloaded font:
file:////path/to/fonts/fontawesome-webfont.woff?v=4.4.0
OTS parsing error: incorrect file size in WOFF header

解碼下載的字體失敗:
file:////path/to/fonts/fontawesome-webfont.ttf?v=4.4.0
OTS解析錯誤:表目錄的entrySelector不正確

Failed to decode downloaded font:
file:////path/to/fonts/fontawesome-webfont.ttf?v=4.4.0
OTS parsing error: incorrect entrySelector for table directory

我已經嘗試通過刪除所有版本參數來修改 FontAwesome 的 css 文件,但這似乎不是問題.通過 electron . 啟動應用程序以及在瀏覽器中查看 html 文件時都會出現問題.

I have already tried to modify FontAwesome's css file by removing all the version parameters but this does not seem to be the problem. The Issues comes up both by starting the app via electron . and when viewing the html-file in the browser.

更新

回答一些評論:

  • 此問題出現在電子和瀏覽器中(在 chrome 和 firefox 中測試)
  • 我使用的是最新版本的 FontAwesome (4.4.0) 和 Electron (0.32.1)(通過 npm 全新安裝)
  • css 的加載方式如下:

推薦答案

問題出在我的 grunt 文件中.我試圖通過簡單地在他們的供應商網站上手動下載所有依賴項并將它們放在我項目的相應腳本文件夾中來重現該問題 - 突然它起作用了.

The Problem was in my grunt-file. I tried to reproduce the issue by simply downloading all dependencies manually at their vendors websites and placed them in the corresponding script-folder of my project - suddenly it worked.

我現在切換到 gulp,它仍然有效.不知道我在 grunt 上做錯了什么......

I switched to gulp now and it still works. No idea what i was doing wrong with grunt though...

這篇關于FontAwesome 無法在本地和電子應用程序中加載字體的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

discord.js v12: How do I await for messages in a DM channel?(discord.js v12:我如何等待 DM 頻道中的消息?)
how to make my bot mention the person who gave that bot command(如何讓我的機器人提及發出該機器人命令的人)
How to fix Must use import to load ES Module discord.js(如何修復必須使用導入來加載 ES 模塊 discord.js)
How to list all members from a specific server?(如何列出來自特定服務器的所有成員?)
Discord bot: Fix ‘FFMPEG not found’(Discord bot:修復“找不到 FFMPEG)
Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服務器時的歡迎消息)
主站蜘蛛池模板: 中国美女一级黄色片 | 精品国产乱码久久久久久果冻传媒 | 精品国产一区久久 | 久久久91精品国产一区二区三区 | 欧美精品久久久久 | 日韩在线免费播放 | 波多野结衣电影一区 | 综合久久99 | 欧美a在线 | 亚洲视频1区| 亚洲精品视频在线观看视频 | 日韩欧美一区二区在线播放 | 久草网站| 先锋资源站 | 99久久婷婷国产综合精品电影 | 久久久久久中文字幕 | av网站免费观看 | 青草久久免费视频 | 国产真实精品久久二三区 | 超碰在线网站 | 国产一区二区三区久久久久久久久 | 国产日韩精品视频 | 欧美成人精品一区二区三区 | 黄色片av | 亚洲成人自拍 | 日韩欧美大片 | 亚洲视频一区在线观看 | 国产成人区 | 欧美日韩不卡 | 久久久久久国产一区二区三区 | 狠狠av | 91在线成人 | 国产一区不卡 | 亚洲三区视频 | 久草新在线 | 91综合网| 亚洲视频免费在线播放 | 99re热精品视频国产免费 | 在线2区 | 激情欧美日韩一区二区 | 91精品久久久久久久久久入口 |