Font Build + Patch to Repository Release #34
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Font Build + Patch to Repository Release | |
on: | |
workflow_dispatch: | |
jobs: | |
font-build-patch: | |
name: Font Build + Patch | Iosevka & Nerd Fonts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Step 1 | Setup Node.js | |
uses: actions/setup-node@v4 | |
- name: Step - | Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
# NOTE: Reference for repository to use for installing FontForge: https://askubuntu.com/questions/1058055/how-do-i-install-fontforge-on-kubuntu-18-04 | |
- name: Step 2 | Setup FontForge | |
run: | | |
sudo add-apt-repository universe | |
sudo apt-get update | |
sudo apt-get install fontforge python3-fontforge | |
- name: Step 3 | Main Repository Checkout | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
font/private-build-plans.toml | |
sparse-checkout-cone-mode: false | |
- name: Step 4 | Font (Iosevka) Repository Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: font-build | |
repository: be5invis/Iosevka | |
fetch-depth: 1 | |
- name: Step 5 | Font Patcher Repository Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: font-patch | |
repository: ryanoasis/nerd-fonts | |
sparse-checkout: | | |
bin | |
src/glyphs | |
font-patcher | |
sparse-checkout-cone-mode: false | |
- name: Step 6 | Build Font | |
working-directory: font-build | |
run: | | |
mv ../font/private-build-plans.toml ./ | |
npm install | |
npm install ttfautohint | |
npm run build -- ttf::IosevkaCodexLink | |
mv ./dist/IosevkaCodexLink/TTF/ ../font-patch/font-dist-ttf | |
mkdir ../font-patch/font-dist-ttf/original | |
mv ../font-patch/font-dist-ttf/*.ttf ../font-patch/font-dist-ttf/original | |
# NOTE: Reference for fix in regards to missing Base Library: https://github.com/indygreg/PyOxidizer/issues/406 | |
- name: Step 7 | Patch Font | |
working-directory: font-patch | |
shell: bash | |
run: | | |
unset LD_LIBRARY_PATH | |
for i in font-dist-ttf/original/*.ttf; | |
do "fontforge -script ./font-patcher --complete --mono --progressbars --outputdir font-dist-ttf/patched font-dist-ttf/original/$i"; | |
done | |
ls | |
ls font-dist-ttf | |
- name: Step 8 | Publish Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
prerelease: true | |
files: font-patch/font-dist-ttf/** |