Skip to content

Commit 611ef0e

Browse files
slorberclaude
andcommitted
DO NOT MERGE: Fedora-like and KDE-like font sets
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent b8087c9 commit 611ef0e

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

‎.github/workflows/tmp-font-screenshots.yml‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
os: [ubuntu-24.04]
17+
distro: [fedora, kde]
1718
runs-on: ${{ matrix.os }}
1819
steps:
1920
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -38,26 +39,25 @@ jobs:
3839
run: |
3940
cd "$RUNNER_TEMP/probe"
4041
sudo apt-get update > /dev/null
41-
sudo apt-get install -y xvfb fonts-ubuntu fonts-noto-core fonts-noto-cjk fonts-cantarell fonts-comic-neue > /dev/null
42-
sudo apt-get install -y fonts-adwaita > /dev/null || {
42+
sudo apt-get install -y xvfb fonts-noto-core fonts-noto-cjk > /dev/null
43+
if [ "$DISTRO" = fedora ]; then
44+
sudo apt-get install -y fonts-cantarell > /dev/null
4345
curl -sSL https://download.gnome.org/sources/adwaita-fonts/48/adwaita-fonts-48.2.tar.xz | tar -xJ -C "$RUNNER_TEMP"
4446
mkdir -p ~/.local/share/fonts && find "$RUNNER_TEMP"/adwaita-fonts-48.2 -name '*.ttf' -exec cp {} ~/.local/share/fonts/ \;
4547
fc-cache -f > /dev/null
46-
}
48+
font='Adwaita Sans'
49+
else
50+
font='Noto Sans'
51+
fi
4752
npx playwright-core install --with-deps chromium firefox > /dev/null
48-
fc-list : family | grep -iE 'adwaita|ubuntu|cantarell|noto sans($|,| cjk)|comic|dejavu sans$|liberation sans' | sort -u
49-
google-chrome --version || true
50-
xvfb-run -a node probe.mjs linux-gtkdefault chrome,firefox
51-
# Chrome and Firefox read system-ui from the GTK font of the desktop
52-
for font in 'Ubuntu Sans' 'Adwaita Sans' 'Cantarell' 'Noto Sans' 'Comic Neue'; do
53-
for gtk in gtk-3.0 gtk-4.0; do
54-
mkdir -p ~/.config/$gtk
55-
printf '[Settings]\ngtk-font-name=%s 11\n' "$font" > ~/.config/$gtk/settings.ini
56-
done
57-
echo "::group::GTK font $font"
58-
xvfb-run -a node probe.mjs "linux-gtk-${font// /}" chrome,firefox
59-
echo "::endgroup::"
53+
fc-list : family | grep -iE 'adwaita|ubuntu|cantarell|roboto|noto sans($|,)|dejavu sans$|liberation sans' | sort -u
54+
for gtk in gtk-3.0 gtk-4.0; do
55+
mkdir -p ~/.config/$gtk
56+
printf '[Settings]\ngtk-font-name=%s 11\n' "$font" > ~/.config/$gtk/settings.ini
6057
done
58+
xvfb-run -a node probe.mjs "linux-$DISTRO" chrome,firefox
59+
env:
60+
DISTRO: ${{ matrix.distro }}
6161

6262
- name: macOS
6363
if: runner.os == 'macOS'
@@ -101,7 +101,7 @@ jobs:
101101
if: always()
102102
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
103103
with:
104-
name: font-screenshots-${{ runner.os }}
104+
name: font-screenshots-${{ matrix.distro }}
105105
path: |
106106
${{ runner.temp }}/probe/*.png
107107
${{ runner.temp }}/probe/report.json

0 commit comments

Comments
 (0)