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-02-14 06:43:28 +0300
committerBrad Erickson <eosrei@gmail.com>2016-02-16 11:45:57 +0300
commit6d9acee4b4a0a3e8fe801bf034d5e5539e779b63 (patch)
tree87d762d2fa3512c8d04068bb80d3bedecc081c76
parent22feb00e4f1a965a762061a595f3a640f52e27af (diff)
make: Add 33px margin to bitmaps to fit trace
A trace/"stoke" cannot go outside the edges of the source image. Many of the source SVG vectors go up to the edge of the images, so the resulting traces did not show the entire shape. A 33px margin seems to be correct.
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 019936e..dd7b200 100644
--- a/Makefile
+++ b/Makefile
@@ -17,14 +17,15 @@ EmojiOne-SVGinOT.ttf: build $(SVG_TRACE_FILES)
# Create black SVG traces of the color SVGs to use as glyphs.
# 1. Make the EmojiOne SVG into a PNG with Inkscape
-# 2. Make the PNG into a BMP with ImageMagick
+# 2. Make the PNG into a BMP with ImageMagick and add margin by increasing the
+# canvas size to allow the outer "stroke" to fit.
# 3. Make the BMP into a Edge Detected PGM with mkbitmap
# 4. Make the PGM into a black SVG trace with potrace
build/svg-trace/%.svg: $(SVG_SOURCE)/%.svg
inkscape -w 1000 -h 1000 -z -e $(TMP)/$(*F).png $<
- convert $(TMP)/$(*F).png $(TMP)/$(*F).bmp
+ convert $(TMP)/$(*F).png -gravity center -background xc:transparent -extent 1066x1066 $(TMP)/$(*F).bmp
rm $(TMP)/$(*F).png
- mkbitmap -g -s1 -f 10 -o $(TMP)/$(*F).pgm $(TMP)/$(*F).bmp
+ mkbitmap -g -s 1 -f 10 -o $(TMP)/$(*F).pgm $(TMP)/$(*F).bmp
rm $(TMP)/$(*F).bmp
potrace -s --height 1000pt --width 1000pt -o $@ $(TMP)/$(*F).pgm
rm $(TMP)/$(*F).pgm