Fix the icon font generation
This switches to the maintained `grunt-webfonts` and sets options to fix the font generation by normalizing the icon sizes.
This commit is contained in:
3 files changed
+7
-10
No files matched your search
@@ -289,17 +289,11 @@ tmp/.shell-env: tmp/.ekam-run $(IMAGES) shell/imports/client/changelog.html shel
|
||||
@cd shell/ && PATH=$(METEOR_DEV_BUNDLE)/bin:$$PATH $(METEOR_DEV_BUNDLE)/bin/npm install
|
||||
@touch tmp/.shell-env
|
||||
|
||||
# grunt-webfont 0.4.8 does not work on Node 12. The latest version of grunt-webfont, OTOH, produces
|
||||
# a broken font file (all icons invisible and zero-width). For now we stick with the old version
|
||||
# and run it using Meteor 1.8.2's node which is old enough to run it. This means you have to
|
||||
# install Meteor 1.8.2 in addition to the latest version in order to build Sandstorm. :(
|
||||
METEOR_DEV_BUNDLE_ICONS=$(shell ./find-meteor-dev-bundle.sh METEOR@1.8.2)
|
||||
|
||||
icons/node_modules: icons/package.json
|
||||
cd icons && PATH=$(METEOR_DEV_BUNDLE_ICONS)/bin:$$PATH $(METEOR_DEV_BUNDLE_ICONS)/bin/npm install
|
||||
cd icons && PATH=$(METEOR_DEV_BUNDLE)/bin:$$PATH $(METEOR_DEV_BUNDLE)/bin/npm install
|
||||
|
||||
shell/client/styles/_icons.scss: icons/node_modules icons/*svg icons/Gruntfile.js
|
||||
cd icons && PATH=$(METEOR_DEV_BUNDLE_ICONS)/bin:$$PATH ./node_modules/.bin/grunt
|
||||
cd icons && PATH=$(METEOR_DEV_BUNDLE)/bin:$$PATH ./node_modules/.bin/grunt
|
||||
|
||||
shell/imports/client/changelog.html: CHANGELOG.md
|
||||
@mkdir -p tmp
|
||||
|
||||
+4
-1
@@ -1,5 +1,5 @@
|
||||
module.exports = function(grunt) {
|
||||
grunt.loadNpmTasks("grunt-webfont");
|
||||
grunt.loadNpmTasks("grunt-webfonts");
|
||||
|
||||
|
||||
grunt.initConfig({
|
||||
@@ -13,6 +13,9 @@ module.exports = function(grunt) {
|
||||
engine: "node",
|
||||
autoHint: false,
|
||||
htmlDemo: false,
|
||||
normalize: true,
|
||||
fontHeight: 1001,
|
||||
fontFilename: 'icons-{hash}',
|
||||
relativeFontPath: "/icons/",
|
||||
stylesheet: "scss",
|
||||
templateOptions: {
|
||||
|
||||
+1
-1
@@ -5,6 +5,6 @@
|
||||
"devDependencies": {
|
||||
"grunt": "^1.0.4",
|
||||
"grunt-cli": "^1.3.2",
|
||||
"grunt-webfont": "0.4.8"
|
||||
"grunt-webfonts": "4.0.1"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user