Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1.86 KB

README.md

File metadata and controls

45 lines (32 loc) · 1.86 KB

CI Build Status PyPI pyup

nanoemoji

A wee tool to build color fonts, including the proposed COLRv1. Relies heavily on Skia via picosvg.

For example, to build a COLRv1 font with a focus on handwriting do the following in a venv:

pip install -e .
nanoemoji --helpfull
nanoemoji --color_format glyf_colr_1 $(find ../noto-emoji/svg -name 'emoji_u270d*.svg')

Releasing

See https://googlefonts.github.io/python#make-a-release.

QA

To help confirm valid output nanoemoji can optionally perform image diffs between resvg rendering of the original SVGs and Skia rendering from the compiled font. Usage:

# Make sure colr_test is compiled and on PATH
git clone [email protected]:rsheeter/skia_colr.git
(cd colr_test && ./build_colr.sh)
export PATH="$PATH:$(cd skia_colr/out/Static/ && pwd)"
which colr_test

# Make sure resvg tool is compiled and on PATH. E.g. you can use cargo to install it
cargo install resvg
which resvg

# Get some svgs to play with
git clone --recursive [email protected]:googlefonts/color-fonts.git

# Now run nanoemoji, render some hands, and see how we do!
# https://rsheeter.github.io/android_fonts/emoji.html?q=u:270b
nanoemoji --gen_svg_font_diffs \
	$(find color-fonts/font-srcs/noto-emoji/svg -name 'emoji_u270b*.svg')