-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from adam7/feature/update-font-patcher
Update Nerd Font font-patcher
- Loading branch information
Showing
7 changed files
with
54 additions
and
554 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ on: | |
|
||
jobs: | ||
check-for-new-cascadia: | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
tag_name: ${{ env.CASCADIATAG }} | ||
tag_exists: ${{ steps.check_tag.outputs.exists }} | ||
|
@@ -24,9 +24,7 @@ jobs: | |
uses: octokit/[email protected] | ||
id: get_latest_release | ||
with: | ||
route: GET /repos/{owner}/{repo}/releases/latest | ||
owner: microsoft | ||
repo: cascadia-code | ||
route: GET /repos/microsoft/cascadia-code/releases/latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Get the latest Cascadia tag | ||
|
@@ -46,14 +44,13 @@ jobs: | |
build-and-release: | ||
needs: check-for-new-cascadia | ||
if: ${{ github.event_name != 'schedule' || needs.check-for-new-cascadia.outputs.tag_exists != 'true' }} | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-22.04 | ||
env: | ||
NERDFONTVERS: v2.1.0 | ||
CASCADIATAG: ${{ needs.check-for-new-cascadia.outputs.tag_name }} | ||
CASCADIATAG_ISNOTNEW: ${{ needs.check-for-new-cascadia.outputs.tag_exists }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Decide on version | ||
|
@@ -68,29 +65,46 @@ jobs: | |
fi | ||
echo "OURVERSION=${OURVERSION}" >> $GITHUB_ENV | ||
- name: Download latest version of Cascadia | ||
uses: robinraju/[email protected] | ||
with: | ||
repository: "microsoft/cascadia-code" | ||
tag: ${{ needs.check-for-new-cascadia.outputs.tag_name }} | ||
fileName: "*.zip" | ||
- name: Open Cascadia release | ||
run: | | ||
CASCADIAVERS=`curl -L 'https://github.com/microsoft/cascadia-code/releases/latest' | grep CascadiaCode | sed 's!\(.*/microsoft/cascadia-code/releases/download/\([^"]*\).*\|.*span.*\)!\2!'` | ||
echo Downloading ${CASCADIAVERS} | ||
curl -L https://github.com/microsoft/cascadia-code/releases/download/${CASCADIAVERS} -O | ||
unzip CascadiaCode*.zip | ||
- name: Install FontForge | ||
run: | | ||
sudo add-apt-repository ppa:fontforge/fontforge -y -u; | ||
sudo apt-get install fontforge -y; | ||
- name: Download and patch Font Patcher | ||
unzip CascadiaCode*.zip 'ttf/*' | ||
# Ubuntu 20.04 has only fontforge release 2020, but there are some vital bugfixes in the 2022 release | ||
# This can be replaced with the ordinary apt package when Ubuntu updates, probably with 22.10? | ||
- name: Fetch FontForge | ||
run: | | ||
curl -L https://raw.githubusercontent.com/ryanoasis/nerd-fonts/${NERDFONTVERS}/font-patcher --output font-patcher | ||
patch font-patcher 0001*.patch | ||
- name: Download source fonts | ||
sudo apt install software-properties-common python3-fontforge fuse -y -q | ||
curl -L "https://github.com/fontforge/fontforge/releases/download/20220308/FontForge-2022-03-08-582bd41-x86_64.AppImage" \ | ||
--output fontforge | ||
chmod u+x fontforge | ||
echo Try appimage | ||
./fontforge --version | ||
export PATH=`pwd`:$PATH | ||
echo "PATH=$PATH" >> $GITHUB_ENV | ||
echo Try appimage with path | ||
fontforge --version | ||
- name: Get Font Patcher | ||
uses: robinraju/[email protected] | ||
with: | ||
repository: "ryanoasis/nerd-fonts" | ||
latest: true | ||
fileName: "FontPatcher.zip" | ||
- name: Open Font Patcher release | ||
run: | | ||
chmod +x download-source-fonts.sh | ||
./download-source-fonts.sh | ||
unzip FontPatcher.zip | ||
- name: Install PIP | ||
run: sudo apt install python-pip -y | ||
run: sudo apt install python3-pip -y | ||
- name: Install configparser | ||
run: pip install configparser | ||
run: pip3 install configparser | ||
- name: Extract additional powerline glyphs | ||
run: fontforge -lang=ff -script extract-extra-glyphs | ||
run: fontforge -lang=ff -script "`pwd`/extract-extra-glyphs" "`pwd`" `pwd`/src/**/octicons.ttf | ||
- name: Build Powerline | ||
run: | | ||
./do_generate 01 --powerline --mono CascadiaCodePL-Regular.ttf DelugiaPL.ttf "Delugia PL" | ||
|
@@ -148,32 +162,32 @@ jobs: | |
zip delugia-book.zip delugia-book/* | ||
- name: Check for preexisting glyphs | ||
run: | | ||
grep 'Found existing' process*.log | ||
- uses: actions/upload-artifact@master | ||
grep 'Found existing' process*.log | grep -vE ' Powerline(Extra)?Symbols>' | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: Delugia Powerline | ||
path: "delugia-powerline" | ||
- uses: actions/upload-artifact@master | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: Delugia Mono Powerline | ||
path: "delugia-mono-powerline" | ||
- uses: actions/upload-artifact@master | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: Delugia Complete | ||
path: "delugia-complete" | ||
- uses: actions/upload-artifact@master | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: Delugia Mono Complete | ||
path: "delugia-mono-complete" | ||
- uses: actions/upload-artifact@master | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: Delugia Book | ||
path: "delugia-book" | ||
|
||
# Release part | ||
- name: Create tag | ||
if: ${{ github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/tags/') && needs.check-for-new-cascadia.outputs.tag_exists != 'true' }} | ||
uses: actions/github-script@v3 | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ github.token }} | ||
script: | | ||
|
This file was deleted.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
Open("src/glyphs/Hack-Regular.ttf"); | ||
Open($2); | ||
SelectAll(); | ||
SelectFewer(0u2262,0u2263); | ||
SelectFewer(0u276F); | ||
SelectFewer(0u26A1); | ||
Clear(); | ||
Generate("src/glyphs/SomeExtraSymbols.otf"); | ||
Save($1 + "/src/glyphs/SomeExtraSymbols.sfd"); |
Oops, something went wrong.