这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: Publish image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build image
run: docker build -t nerdfonts/patcher .
- name: Push image
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/font-patcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v3

- name: Setup core dependencies
run: |
Expand Down
42 changes: 25 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
ref: master
fetch-depth: '1'
- uses: actions/checkout@v3
-
id: set-matrix
run: |
Expand Down Expand Up @@ -60,11 +57,7 @@ jobs:

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
ref: master
fetch-depth: '1'

- uses: actions/checkout@v3
- name: Set release variables
run: |
cd -- "$GITHUB_WORKSPACE"
Expand All @@ -83,10 +76,22 @@ jobs:
run: |
sudo apt update -y -q
sudo apt install software-properties-common -y -q
sudo apt update -y -q
sudo apt install fontforge -y -q
sudo apt install python3-fontforge -y -q

# 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://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: Setup additional dependencies
run: |
pip install fonttools --quiet
Expand Down Expand Up @@ -129,7 +134,7 @@ jobs:
- name: Patch all the variations of the font family
run: |
cd -- "$GITHUB_WORKSPACE/bin/scripts"
fontforge --script ../../font-patcher --version
fontforge --script `pwd`/../../font-patcher --version
./gotta-patch-em-all-font-patcher\!.sh "/${{ matrix.font }}"

- name: Generate fontconfig and casks
Expand Down Expand Up @@ -164,8 +169,7 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v3
- name: Set release variables
run: |
cd -- "$GITHUB_WORKSPACE"
Expand Down Expand Up @@ -193,7 +197,11 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Prepare repo (clear out old and obsolete fonts)
run: |
cd -- "$GITHUB_WORKSPACE/patched-fonts"
find . -name "*.[to]tf" -exec rm {} \;

- name: Download patched fonts from build
id: download-patched-fonts
Expand All @@ -202,9 +210,9 @@ jobs:
name: patched-fonts
path: .

- uses: EndBug/add-and-commit@v7
- uses: EndBug/add-and-commit@v9
with:
add: 'patched-fonts'
message: Rebuilds patched fonts
committer_name: GitHub Actions
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
15 changes: 8 additions & 7 deletions bin/scripts/gotta-patch-em-all-font-patcher!.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# If the argument starts with a '/' all font files in a directory that matches
# the filter are processed only.
# Example ./gotta-patch-em-all-font-patcher\!.sh "/iosevka"
# Process all font files that are in directories that start with "iosevka"
# Process all font files that are in directory "iosevka"

# for executing script to rebuild JUST the readmes:
# ./gotta-patch-em-all-font-patcher\!.sh "" info
Expand Down Expand Up @@ -55,7 +55,7 @@ then
if [[ "${1:0:1}" == "/" ]]
then
like_mode="-ipath"
like_pattern="*$1*/*.[o,t]tf"
like_pattern="*$1/*.[o,t]tf"
echo "$LINE_PREFIX Parameter given, limiting search and patch to pathname pattern '$1' given"
else
like_mode="-iname"
Expand Down Expand Up @@ -141,11 +141,12 @@ function patch_font {
echo >&2 "# Could not find project parent directory"
exit 1
}

fontforge -quiet -script ./font-patcher "$f" -q $powerline $post_process --complete --no-progressbars --outputdir "${patched_font_dir}complete/" 2>/dev/null
fontforge -quiet -script ./font-patcher "$f" -q -s ${font_config} $powerline $post_process --complete --no-progressbars --outputdir "${patched_font_dir}complete/" 2>/dev/null
fontforge -quiet -script ./font-patcher "$f" -q -w $powerline $post_process --complete --no-progressbars --outputdir "${patched_font_dir}complete/" 2>/dev/null
fontforge -quiet -script ./font-patcher "$f" -q -s ${font_config} -w $powerline $post_process --complete --no-progressbars --outputdir "${patched_font_dir}complete/" 2>/dev/null
# Use absolute path to allow fontforge being an AppImage (used in CI)
PWD=`pwd`
fontforge -quiet -script $PWD/font-patcher "$f" -q $powerline $post_process --complete --no-progressbars --outputdir "${patched_font_dir}complete/" 2>/dev/null
fontforge -quiet -script $PWD/font-patcher "$f" -q -s ${font_config} $powerline $post_process --complete --no-progressbars --outputdir "${patched_font_dir}complete/" 2>/dev/null
fontforge -quiet -script $PWD/font-patcher "$f" -q -w $powerline $post_process --complete --no-progressbars --outputdir "${patched_font_dir}complete/" 2>/dev/null
fontforge -quiet -script $PWD/font-patcher "$f" -q -s ${font_config} -w $powerline $post_process --complete --no-progressbars --outputdir "${patched_font_dir}complete/" 2>/dev/null
# wait for this group of background processes to finish to avoid forking too many processes
# that can add up quickly with the number of combinations
#wait
Expand Down