1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-11-19 16:39:20 +02:00

CI: Use fontforge March 2022 AppImage

[why]
It might be easier to use the precompiled application than to build it
ourselves.

[how]
The AppImage has the typical problem with relative paths, so we need to
change some small calls.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2022-08-19 12:57:42 +02:00 committed by Fini
parent 2050b4dc16
commit 5ff4f92a23
2 changed files with 17 additions and 29 deletions

View File

@ -77,33 +77,20 @@ jobs:
sudo apt update -y -q
sudo apt install software-properties-common -y -q
sudo apt install python3-fontforge -y -q
sudo apt install libjpeg-dev libtiff5-dev libpng-dev libfreetype6-dev libgif-dev libgtk-3-dev libxml2-dev libpango1.0-dev libcairo2-dev libspiro-dev python3-dev ninja-build cmake build-essential gettext libuninameslist-dev -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: Cache Fontforge executable
id: cache-fontforge
uses: actions/cache@v3
with:
path: fontforge-20220308
key: ${{ runner.os }}-fontforge
- name: Build FontForge
if: steps.cache-fontforge.outputs.cache-hit != 'true'
- name: Fetch FontForge
run: |
curl -Lv "https://github.com/fontforge/fontforge/releases/download/20220308/fontforge-20220308.tar.xz" \
--output FontForge.tar.xz
tar -xf FontForge.tar.xz
cd fontforge-20220308
sudo mkdir build
cd build
sudo cmake -GNinja ..
sudo ninja
- name: Install Fontforge
run: |
cd fontforge-20220308/build
sudo ninja install
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: |
@ -147,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

View File

@ -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