Merge pull request #297 from kabisa/feature/dependency-management
Feature/dependency managementpull/303/head
commit
2d11453d18
9
Makefile
9
Makefile
|
@ -134,7 +134,7 @@ compressed: $(ALL_COMPRESSED_FILES)
|
|||
check_compress_tool:
|
||||
ifdef MISSING_ZOPFLI
|
||||
ifdef MISSING_OPTIPNG
|
||||
$(error "neither $(ZOPFLIPNG) nor $(OPTIPNG) is available")
|
||||
$(error "neither $(ZOPFLIPNG) nor $(OPTIPNG) is available. For installation instructions, see README.md")
|
||||
else
|
||||
@echo "using $(OPTIPNG)"
|
||||
endif
|
||||
|
@ -197,6 +197,11 @@ else
|
|||
@$(ZOPFLIPNG) -y "$<" "$@" 1> /dev/null 2>&1
|
||||
endif
|
||||
|
||||
check-virtual-env:
|
||||
ifeq (${VIRTUAL_ENV},)
|
||||
@echo Please start your virtual environment, and run: "'pip install -r requirements.txt'".
|
||||
@false
|
||||
endif
|
||||
|
||||
# Make 3.81 can endless loop here if the target is missing but no
|
||||
# prerequisite is updated and make has been invoked with -j, e.g.:
|
||||
|
@ -214,7 +219,7 @@ endif
|
|||
@rm -f "$@"
|
||||
ttx "$<"
|
||||
|
||||
$(EMOJI).ttf: $(EMOJI).tmpl.ttf $(EMOJI_BUILDER) $(PUA_ADDER) \
|
||||
$(EMOJI).ttf: check-virtual-env $(EMOJI).tmpl.ttf $(EMOJI_BUILDER) $(PUA_ADDER) \
|
||||
$(ALL_COMPRESSED_FILES) | check_vs_adder
|
||||
@$(PYTHON) $(EMOJI_BUILDER) $(SMALL_METRICS) -V $< "$@" "$(COMPRESSED_DIR)/emoji_u"
|
||||
@$(PYTHON) $(PUA_ADDER) "$@" "$@-with-pua"
|
||||
|
|
27
README.md
27
README.md
|
@ -2,16 +2,29 @@
|
|||
# Noto Emoji
|
||||
Color and Black-and-White Noto emoji fonts, and tools for working with them.
|
||||
|
||||
## Prerequisites
|
||||
Building Noto Color Emoji requires:
|
||||
- Python 3
|
||||
- [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/)
|
||||
- [pngquant](https://pngquant.org/)
|
||||
- Either [zopflipng](https://github.com/google/zopfli) or [optipng](http://optipng.sourceforge.net/). Zopflipng is better (about 5-10%) but much slower.
|
||||
|
||||
## Building NotoColorEmoji
|
||||
This project uses a virtual environment to manage dependencies. Use the following steps to get up and running.
|
||||
|
||||
Building NotoColorEmoji currently requires a Python 2.x wide build. To build
|
||||
the emoji font you will require a few files from nototools. Clone a copy from
|
||||
https://github.com/googlei18n/nototools and either put it in your PYTHONPATH or
|
||||
use 'python setup.py develop' ('install' currently won't fully install all the
|
||||
data used by nototools). You will also need fontTools, get it from
|
||||
https://github.com/behdad/fonttools.git.
|
||||
Create a virtual environment called `noto-emoji-env`:
|
||||
|
||||
Then run make. NotoColorEmoji is the default target. It's suggested to use -j,
|
||||
python3 -m venv noto-emoji-env
|
||||
|
||||
Activate the virtual environment:
|
||||
|
||||
source noto-emoji-env/bin/activate
|
||||
|
||||
Install the Python requirements with:
|
||||
|
||||
pip install -r requirements.txt
|
||||
|
||||
Then run `make`. NotoColorEmoji is the default target. It's suggested to use -j,
|
||||
especially if you are using zopflipng for compression. Intermediate products
|
||||
(compressed image files, for example) will be put into a build subdirectory; the
|
||||
font will be at the top level.
|
||||
|
|
|
@ -18,13 +18,11 @@
|
|||
|
||||
__author__ = "roozbeh@google.com (Roozbeh Pournader)"
|
||||
|
||||
|
||||
import sys
|
||||
|
||||
from fontTools import agl
|
||||
from fontTools import ttLib
|
||||
from fontTools.ttLib.tables import otTables
|
||||
|
||||
from fontTools import ttLib
|
||||
from nototools import font_data
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
fonttools>=4.7.0
|
||||
-e git://github.com/googlefonts/nototools.git#egg=master
|
Loading…
Reference in New Issue