diff --git a/.github/workflows/generate-fonts.yml b/.github/workflows/generate-fonts.yml index 0974674..5278ba3 100644 --- a/.github/workflows/generate-fonts.yml +++ b/.github/workflows/generate-fonts.yml @@ -15,7 +15,6 @@ jobs: echo Downloading ${CASCADIAVERS} curl -L https://github.com/microsoft/cascadia-code/releases/download/${CASCADIAVERS} -O unzip CascadiaCode*.zip - mv **/CascadiaCodePL.ttf . - name: Install FontForge run: | sudo add-apt-repository ppa:fontforge/fontforge -y -u; @@ -32,6 +31,8 @@ jobs: run: pip install configparser - name: Extract additional powerline glyphs run: fontforge -lang=ff -script extract-extra-glyphs + - name: Prepare Caskadia Code font file + run: fontforge prepare-font --input **/CascadiaCodePL.ttf --output CascadiaCodePL.ttf - name: Build Powerline run: | fontforge -script font-patcher --careful --powerline --custom SomeExtraSymbols.otf \ diff --git a/prepare-font b/prepare-font new file mode 100644 index 0000000..2c8a669 --- /dev/null +++ b/prepare-font @@ -0,0 +1,14 @@ +#!/usr/bin/env python +# coding=utf8 + +import fontforge +from argparse import ArgumentParser + +# Setup and parse the comand-line arguments +parser = ArgumentParser() +parser.add_argument("--input", help="input file name") +parser.add_argument("--output", help="output file name") +args = parser.parse_args() + +# Just open and save the font, to fix some internal structure +fontforge.open(args.input).generate(args.output)