Skip to content
This repository has been archived by the owner on Nov 10, 2018. It is now read-only.

Commit

Permalink
makefile: Build both versions and package to zips
Browse files Browse the repository at this point in the history
  • Loading branch information
13rac1 committed Mar 11, 2016
1 parent bd621cf commit c4c5acd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
33 changes: 24 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@

# Makefile to create all versions of the Emoji One Color SVGinOT font
# Run with: make -j [NUMBER_OF_CPUS]

.PHONY: clean

OUTPUT_FONT := build/EmojiOneColor-SVGinOT.ttf
SCFBUILD := SCFBuild/bin/scfbuild

TMP := /tmp
# Use Linux Shared Memory to avoid wasted disk writes.
#TMP := /dev/shm

# Where to find scfbuild?
SCFBUILD := SCFBuild/bin/scfbuild

VERSION := 1.0-beta
FONT_PREFIX := build/EmojiOneColor-SVGinOT
REGULAR_FONT := $(FONT_PREFIX).ttf
OSX_FONT := $(FONT_PREFIX)-OSX.ttf
REGULAR_ZIP := $(FONT_PREFIX)-$(VERSION).zip
OSX_ZIP := $(FONT_PREFIX)-OSX-$(VERSION).zip

# There are two SVG source directories to keep the emojione assets separate.
SVG_EMOJIONE := assets/emojione-svg
SVG_MORE := assets/svg
Expand All @@ -21,10 +26,20 @@ SVG_STAGE_FILES := $(patsubst $(SVG_MORE)/%.svg, build/stage/%.svg, $(SVG_STAGE_
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)
.PHONY: clean package

all: $(REGULAR_FONT) $(OSX_FONT)

package: all
rm -f $(REGULAR_ZIP) $(OSX_ZIP)
7z a -tzip -mx=9 $(REGULAR_ZIP) ./$(REGULAR_FONT)
7z a -tzip -mx=9 $(OSX_ZIP) ./$(OSX_FONT)

$(REGULAR_FONT): $(SVG_TRACE_FILES) $(SVG_COLOR_FILES)
$(SCFBUILD) -c scfbuild.yml -o $(REGULAR_FONT) --font-version="$(VERSION)"

$(OUTPUT_FONT): $(SVG_TRACE_FILES) $(SVG_COLOR_FILES)
$(SCFBUILD) -c scfbuild.yml -o $(OUTPUT_FONT)
$(OSX_FONT): $(SVG_TRACE_FILES) $(SVG_COLOR_FILES)
$(SCFBUILD) -c scfbuild-osx.yml -o $(OSX_FONT) --font-version="$(VERSION)"

# Create black SVG traces of the color SVGs to use as glyphs.
# 1. Make the EmojiOne SVG into a PNG with Inkscape
Expand Down
1 change: 0 additions & 1 deletion scfbuild-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ table_name:
subfamily: Regular
unique_id: Emoji One Color SVGinOT OSX eosrei.net
full_name: Emoji One Color SVGinOT OSX
version: 1.0-beta
# Use the same postscript name as the Apple Color Emoji font to overide it.
postscript_name: AppleColorEmoji
#trademark:
Expand Down
1 change: 0 additions & 1 deletion scfbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ table_name:
subfamily: Regular
unique_id: Emoji One Color SVGinOT eosrei.net
full_name: Emoji One Color SVGinOT
version: 1.0-beta
# No spaces in PostScript Names
postscript_name: EmojiOneColorSVGinOT
#trademark:
Expand Down

0 comments on commit c4c5acd

Please sign in to comment.