我想添加一個特定的圖標字體到我的項目Ionic 2.我只是有一個文件夾與我的字體,但我不知道如何將它集成到項目。Ionic 2:爲Ionic 2項目添加一個圖標字體
我嘗試添加web字體醫療圖標: https://samcome.github.io/webfont-medical-icons/
我試着將它添加在我的WWW /資產/ fonts文件夾中,但我不知道巫文件我已經更新到使用這個字體?
UPDATE
我已經有字體真棒到我的項目。我試圖按照相同的過程:
我通過我的www/assets/fonts文件夾中的4個字體文件。
我通過我的www/assets/cass文件夾中的文件「wfmi-style.min.css」。
Finaly我寫這在我的src/index.html文件:
<link href="assets/css/font-awesome.min.css" rel="stylesheet">
<link href="assets/css/wfmi-style.min.css" rel="stylesheet">
<link href="build/main.css" rel="stylesheet">
但我有此錯誤:
Failed to decode downloaded font: http://localhost:8100/assets/fonts/webfont-medical-icons.ttf
(index):1 Failed to decode downloaded font:
http://localhost:8100/assets/fonts/webfont-medical-icons.woff
有一個在我的WFMI式開始時的代碼。 min.css:
@font-face {
font-family: 'webfont-medical-icons';
src:url('../fonts/webfont-medical-icons.eot');
src:url('../fonts/webfont-medical-icons.eot?#iefix') format('embedded-opentype'),
url('../fonts/webfont-medical-icons.ttf') format('truetype'),
url('../fonts/webfont-medical-icons.woff') format('woff'),
url('../fonts/webfont-medical-icons.svg#webfont-medical-icons') format('svg');
font-weight: normal;
font-style: normal;
}
感謝您的回答。我更新了我的帖子。 –