Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added build pipeline process for generating fonts #113

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
59 changes: 59 additions & 0 deletions .github/workflows/build_fonts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Script to build font files.

name: Build Fonts

on:
# Triggers the workflow on pull request events but only for the "main" branch
pull_request:
branches: [ "main" ]
push:
branches: [ "*" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build_fonts:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set Up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: install Python dependencies
run: |
python -m pip install -U pip
python -m pip install -U fonttools[ufo,woff]
python -m pip install git+https://github.com/prasannagunuru/nanoemoji.git@PrasannaG/rules_into_feature_file
- name: build Color font
run: |
python scripts/copy_assets.py assets --style="Color" --popular=20
nanoemoji --color_format="glyf_colr_1" --output_file="font_color.ttf" --width=0 --noclip_to_viewbox --family="Emoji Color" svgs/*.svg
mv build/font_color.otf .
rm -rf svgs
rm -rf build
- name: build Flat font
run: |
python scripts/copy_assets.py assets --style="Flat" --popular=20
nanoemoji --color_format="glyf_colr_0" --output_file="font_flat.ttf" --width=0 --noclip_to_viewbox --family="Emoji Flat" svgs/*.svg
mv build/font_flat.otf .
rm -rf svgs
rm -rf build
- name: build High Contrast font
run: |
python scripts/copy_assets.py assets --style="High Contrast" --popular=20
nanoemoji --color_format="glyf" --output_file="font_hc.ttf" --width=0 --noclip_to_viewbox --family="Emoji High Contrast" svgs/*.svg
mv build/font_hc.otf .
rm -rf svgs
rm -rf build

- name: attach fonts as build artifacts
uses: actions/upload-artifact@v3
with:
name: font_package
path: |
font_*.ttf
216 changes: 216 additions & 0 deletions combo/Color/emoji_u1f466_1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
122 changes: 122 additions & 0 deletions combo/Color/emoji_u1f466_1f3fb_1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading