Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/13rac1/emojione-color-font.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Erickson <eosrei@gmail.com>2016-03-11 05:57:50 +0300
committerBrad Erickson <eosrei@gmail.com>2016-03-11 05:57:50 +0300
commitbd621cf4cbe731287d6d0aa5352d2d88dbb0fc7c (patch)
tree71256cfccc9229116d675d810744d11ed5199f39 /Makefile
parent6fc0fd2f79d39868b4e41ee63a073e95e8b72c1c (diff)
make: Reduce color SVG file size with SVGO
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index ee5ef6b..7929a48 100644
--- a/Makefile
+++ b/Makefile
@@ -16,9 +16,10 @@ SVG_MORE := assets/svg
# Create the lists of traced and color SVGs
SVG_FILES := $(wildcard $(SVG_EMOJIONE)/*.svg) $(wildcard $(SVG_MORE)/*.svg)
-SVG_TRACE_FILES := $(patsubst $(SVG_EMOJIONE)/%.svg, build/svg-trace/%.svg, $(SVG_FILES))
-SVG_TRACE_FILES := $(patsubst $(SVG_MORE)/%.svg, build/svg-trace/%.svg, $(SVG_TRACE_FILES))
-SVG_COLOR_FILES := $(patsubst build/svg-trace/%.svg, build/staging/%.svg, $(SVG_TRACE_FILES))
+SVG_STAGE_FILES := $(patsubst $(SVG_EMOJIONE)/%.svg, build/stage/%.svg, $(SVG_FILES))
+SVG_STAGE_FILES := $(patsubst $(SVG_MORE)/%.svg, build/stage/%.svg, $(SVG_STAGE_FILES))
+SVG_TRACE_FILES := $(patsubst build/stage/%.svg, build/svg-trace/%.svg, $(SVG_STAGE_FILES))
+SVG_COLOR_FILES := $(patsubst build/stage/%.svg, build/svg-color/%.svg, $(SVG_STAGE_FILES))
all: $(OUTPUT_FONT)
@@ -37,9 +38,12 @@ build/svg-trace/%.svg: build/staging/%.svg | build/svg-trace
rm $(TMP)/$(*F).png
mkbitmap -g -s 1 -f 10 -o $(TMP)/$(*F).pgm $(TMP)/$(*F).bmp
rm $(TMP)/$(*F).bmp
- potrace -s --height 2048pt --width 2048pt -o $@ $(TMP)/$(*F).pgm
+ potrace --flat -s --height 2048pt --width 2048pt -o $@ $(TMP)/$(*F).pgm
rm $(TMP)/$(*F).pgm
+build/svg-color/%.svg: build/staging/%.svg | build/svg-color
+ svgo -i $< -o $@
+
# Copy the files from multiple directories into one source directory
build/staging/%.svg: $(SVG_EMOJIONE)/%.svg | build/staging
cp $< $@
@@ -57,5 +61,8 @@ build/staging: | build
build/svg-trace: | build
mkdir build/svg-trace
+build/svg-color: | build
+ mkdir build/svg-color
+
clean:
rm -rf build