Use only woff and woff2

This commit is contained in:
Alex Ling 2021-02-11 08:40:24 +00:00
parent 933617503e
commit 154d85e197
3 changed files with 7 additions and 4 deletions

View File

@ -10,7 +10,7 @@ gulp.task('copy-img', () => {
}); });
gulp.task('copy-font', () => { gulp.task('copy-font', () => {
return gulp.src('node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.*') return gulp.src('node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff**')
.pipe(gulp.dest('public/webfonts')); .pipe(gulp.dest('public/webfonts'));
}); });

View File

@ -5,6 +5,12 @@
@import "../../node_modules/@fortawesome/fontawesome-free/less/fontawesome.less"; @import "../../node_modules/@fortawesome/fontawesome-free/less/fontawesome.less";
@import "../../node_modules/@fortawesome/fontawesome-free/less/solid.less"; @import "../../node_modules/@fortawesome/fontawesome-free/less/solid.less";
@font-face {
src: url('@{fa-font-path}/fa-solid-900.woff2');
src: url('@{fa-font-path}/fa-solid-900.woff2') format('woff2'),
url('@{fa-font-path}/fa-solid-900.woff') format('woff');
}
// Item cards // Item cards
.item .uk-card { .item .uk-card {
cursor: pointer; cursor: pointer;

View File

@ -35,9 +35,6 @@ def register_mime_types
# FontAwesome fonts # FontAwesome fonts
".woff" => "font/woff", ".woff" => "font/woff",
".woff2" => "font/woff2", ".woff2" => "font/woff2",
".eot" => "application/vnd.ms-fontobject",
".ttf" => "font/ttf",
".svg" => "image/svg+xml",
}.each do |k, v| }.each do |k, v|
MIME.register k, v MIME.register k, v
end end