Skip to content

Commit

Permalink
svg: Add Power Symbols
Browse files Browse the repository at this point in the history
Adds the Unicode 9.0 Power Symbol glyphs. They aren't emoji, but
should be supported anyway.

Details: http://unicodepowersymbol.com/
  • Loading branch information
13rac1 committed Jun 23, 2016
1 parent 68c399a commit b6d5340
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 15 deletions.
11 changes: 10 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Licenses

* Copyright 2016 Brad Erickson CC-BY-4.0
* Copyright 2016 Brad Erickson CC-BY-4.0/MIT
* Copyright 2015 Ranks.com Inc. CC-BY-4.0
* Copyright 2013 Joe Loughry and Terence Eden MIT

## Artwork
* Applies to SVG files and TTF font files
Expand All @@ -24,3 +25,11 @@ color glyphs. Files are stored in `assets/emojione-svg`.

Please review the specific attribution requirements for commercial use of
EmojiOne graphics: http://emojione.com/licensing/

## Power Symbol License
The SVG files from the [Unicode Power Symbol](http://unicodepowersymbol.com/)
project have been modified to create B&W Power Symbol glyphs. Files are stored
in `assets/svg-bw`.

* Source: https://github.com/jloughry/Unicode
* Art License: MIT
30 changes: 18 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,21 @@ OSX_PACKAGE := build/$(FONT_PREFIX)-OSX-$(VERSION)
LINUX_PACKAGE := $(FONT_PREFIX)-Linux-$(VERSION)
DEB_PACKAGE := fonts-emojione-svginot

# There are two SVG source directories to keep the emojione assets separate.
# There are two SVG source directories to keep the emojione assets separate
# from the additions
SVG_EMOJIONE := assets/emojione-svg
SVG_MORE := assets/svg
SVG_EXTRA := assets/svg
# B&W only glyphs which will not be processed.
SVG_EXTRA_BW := assets/svg-bw

# Create the lists of traced and color SVGs
SVG_FILES := $(wildcard $(SVG_EMOJIONE)/*.svg) $(wildcard $(SVG_MORE)/*.svg)
SVG_FILES := $(wildcard $(SVG_EMOJIONE)/*.svg) $(wildcard $(SVG_EXTRA)/*.svg)
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_STAGE_FILES := $(patsubst $(SVG_EXTRA)/%.svg, build/stage/%.svg, $(SVG_STAGE_FILES))
SVG_BW_FILES := $(patsubst build/stage/%.svg, build/svg-bw/%.svg, $(SVG_STAGE_FILES))
SVG_COLOR_FILES := $(patsubst build/stage/%.svg, build/svg-color/%.svg, $(SVG_STAGE_FILES))

.PHONY: all package regular-package linux-package osx-package clean
.PHONY: all package regular-package linux-package osx-package copy-extra clean

all: $(REGULAR_FONT) $(OSX_FONT)

Expand Down Expand Up @@ -71,19 +74,22 @@ osx-package: $(OSX_FONT)
7z a -tzip -mx=9 $(OSX_PACKAGE).zip ./$(OSX_PACKAGE)

# Build both versions of the fonts
$(REGULAR_FONT): $(SVG_TRACE_FILES) $(SVG_COLOR_FILES)
$(REGULAR_FONT): $(SVG_BW_FILES) $(SVG_COLOR_FILES) copy-extra
$(SCFBUILD) -c scfbuild.yml -o $(REGULAR_FONT) --font-version="$(VERSION)"

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

copy-extra: build/svg-bw
cp $(SVG_EXTRA_BW)/* build/svg-bw/

# 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 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: build/staging/%.svg | build/svg-trace
build/svg-bw/%.svg: build/staging/%.svg | build/svg-bw
inkscape -w 1000 -h 1000 -z -e $(TMP)/$(*F).png $<
convert $(TMP)/$(*F).png -gravity center -extent 1066x1066 $(TMP)/$(*F).bmp
rm $(TMP)/$(*F).png
Expand All @@ -100,7 +106,7 @@ build/svg-color/%.svg: build/staging/%.svg | build/svg-color
build/staging/%.svg: $(SVG_EMOJIONE)/%.svg | build/staging
cp $< $@

build/staging/%.svg: $(SVG_MORE)/%.svg | build/staging
build/staging/%.svg: $(SVG_EXTRA)/%.svg | build/staging
cp $< $@

# Create the build directories
Expand All @@ -110,8 +116,8 @@ build:
build/staging: | build
mkdir build/staging

build/svg-trace: | build
mkdir build/svg-trace
build/svg-bw: | build
mkdir build/svg-bw

build/svg-color: | build
mkdir build/svg-color
Expand Down
1 change: 1 addition & 0 deletions assets/svg-bw/23fb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/svg-bw/23fc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/svg-bw/23fd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/svg-bw/23fe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/svg-bw/2b58.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions assets/svg-bw/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Additional B&W SVG files

SVG files needed to add Unicode Power Symbols: ⏻, ⏼, ⭘,⏽, ⏾

Source: http://unicodepowersymbol.com/

Note: These have been translated (0,-150) verses the source to account for the
overall (0,150) applied to the rest of the glypsh in this font. Do not use them
for other purposes without adjustment.
2 changes: 1 addition & 1 deletion scfbuild-osx.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SCFBuild configuration file for EmojiOne Color SVGinOT (OSX ONLY)
output_file: build/EmojiOneColor-SVGinOT-OSX.ttf
verbose: False
glyph_svg_dir: build/svg-trace
glyph_svg_dir: build/svg-bw
color_svg_dir: build/svg-color
# Translate the SVGs on import into glyphs.
# y+150 for correct emoji-only vertical alignment.
Expand Down
2 changes: 1 addition & 1 deletion scfbuild.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SCFBuild configuration file for EmojiOne Color SVGinOT
output_file: build/EmojiOneColor-SVGinOT.ttf
verbose: False
glyph_svg_dir: build/svg-trace
glyph_svg_dir: build/svg-bw
color_svg_dir: build/svg-color
# Translate the SVGs on import into glyphs.
# y+150 for correct emoji-only vertical alignment.
Expand Down

0 comments on commit b6d5340

Please sign in to comment.