Code Monkey home page Code Monkey logo

color-fonts's Introduction

CI Build Status

color-fonts

Experimental color font builds. Intended to help verify font toolchain builds things that work with consuming tools for COLRv1 (colr gradients spec).

To update the fonts:

  1. Run generate_config.py if the config needs to be updated
  2. Run build.py to generate the font(s) you want to update

Color fonts in the fonts/ folder

The fonts/ folder contains generated COLRv1 (with different glyph shape formats) and OT-SVG fonts for testing and experimentation. The files in this folder follow the following naming convention.

(Glyph set)-(color font format and glyph definition format).(Extension otf or ttf)

The following glyph sets exist:

Glyph set short name Description
noto Full Noto emoji set
noto_handwriting Only the WRITING HAND โœ๏ธ emoji of the Noto Emoji set
noto_flags Only the flag emoji of the Noto emoji set
noto_noflags All but the flags of the Noto emoji set
samples A set of sample glyphs generated from SVG sources
twemoji The set of emoji from the Twitter emoji set
tweomji_smiley Only the smiley emoji from the the Twitter emoji set
test_glyphs A set of test glyphs generated by the a build script in config/test_glyphs-glyf_colr_1.py, see more info below.

The following color font and glyph definition formats exist:

Format short name Description
cff2_colr_1 COLRv1 font with CFF2 table contour definitions
cff_colr_1 COLRv1 fotn with CFF table contour definitions
glyf_colr_1 COLRv1 fotn with glyf table contour definitions (TrueType contours)
picosvg OT-SVG font with SVG sources processed through picosvg
picosvgz OT-SVG font with SVG sources processed through picosvg and gzip compressed
untouchedsvg OT-SVG font with SVG source images embeddded as-is
untouchedsvgz OT-SVG font with SVG source images embeddded as-is and gzip compressed

For example, noto-glyf_colr_1.ttf means that this font contains the Noto Emoji full glyph set, contains the glyph definitions in glyf table format (TrueType outlines) and features a COLRv1 table for the color glyphs functionality. noto_flags-picosvgz.ttf contains only the flag glyphs part of the Noto emoji set, the font is an OT-SVG font where SVG source images went through picosvg for optimization and flattening.

COLRv1 Test Font

The fonts fonts/test_glyphs-glyf_colr_1.ttf "COLRv1 Static Test Glyphs" and fonts/test_glyphs-glyf_colr_1_variable.ttf "COLRv1 Variable Test Glyphs" in this repository provide a set of glyphs testing the static and variable aspects of COLRv1.

Glyph List & Coverage Descriptions

For a list of which glyphs provide test coverage of which specific COLRv1 features, please see the individual glyph descriptions here.

Download the COLRv1 test font

Binaries of the static and variable COLRv1 test font is available in the following files:

Build the COLRv1 test font

If you want to build the test fonts yourself, follow these steps:

Run $ ./build.py config/test_glyphs-glyf_colr_1.py

which builds the static test font fonts/fonts/test_glyphs-glyf_colr_1.ttf as well as the variable test font fonts/test_glyphs-glyf_colr_1_variable.ttf.

Verify Variation Support

To verify that a variable COLRv1 font was built, run $ ttx -tCOLR -o- fonts/test_glyphs-glyf_colr_1_variable.ttf | grep VarStore which should show a <VarStore Format="1"> line.

References

  • nanoemoji, compiles a set of picosvg into a color font
  • picosvg, simplifies svgs to use only a small subset of the full spec

color-fonts's People

Contributors

rsheeter avatar anthrotype avatar drott avatar felipesanches avatar phenomretroshare avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.