Skip to content

Commit

Permalink
Merge pull request #3361 from nextcloud/bugfix/noid/font-url
Browse files Browse the repository at this point in the history
fix: Use proper blob url for all fonts
  • Loading branch information
blizzz authored Dec 15, 2023
2 parents 1339e7a + 31ee000 commit b6e7797
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions build/download-fonts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FONTLIST=(
"https://github.com/google/fonts/raw/main/ofl/amaticsc/AmaticSC-Regular.ttf"
"https://github.com/google/fonts/raw/main/ofl/amaticsc/AmaticSC-Bold.ttf"
"https://github.com/google/fonts/blob/main/ofl/caveat/Caveat%5Bwght%5D.ttf"
"https://github.com/google/fonts/raw/main/ofl/caveat/Caveat%5Bwght%5D.ttf"
"https://github.com/google/fonts/raw/main/ofl/comfortaa/Comfortaa%5Bwght%5D.ttf"
"https://github.com/google/fonts/raw/main/ofl/ebgaramond/EBGaramond%5Bwght%5D.ttf"
"https://github.com/google/fonts/raw/main/ofl/lexend/Lexend%5Bwght%5D.ttf"
Expand All @@ -16,9 +16,9 @@ FONTLIST=(
"https://github.com/google/fonts/raw/main/ofl/oswald/Oswald%5Bwght%5D.ttf"
"https://github.com/google/fonts/raw/main/ofl/pacifico/Pacifico-Regular.ttf"
"https://github.com/google/fonts/raw/main/ofl/playfairdisplay/PlayfairDisplay%5Bwght%5D.ttf"
"https://github.com/google/fonts/blob/main/ofl/roboto/Roboto%5Bwdth%2Cwght%5D.ttf"
"https://github.com/google/fonts/raw/main/ofl/roboto/Roboto%5Bwdth%2Cwght%5D.ttf"
"https://github.com/google/fonts/raw/main/apache/robotomono/RobotoMono%5Bwght%5D.ttf"
"https://github.com/google/fonts/blob/main/ofl/spectral/Spectral-Regular.ttf"
"https://github.com/google/fonts/raw/main/ofl/spectral/Spectral-Regular.ttf"
)

rm assets/fonts/*
Expand All @@ -30,7 +30,7 @@ for font in "${FONTLIST[@]}"; do
wget -q -P assets/fonts/ $font

FILENAME=$(urldecode "$(basename "$font")")

if [[ $FILENAME == *"wght"* ]]; then
NEWFILENAME=$(echo $FILENAME | sed 's/\[wght\]/-wght/g')
NEWFILENAME=$(echo $NEWFILENAME | sed 's/\[wdth,wght\]/-wdtg-wght/g')
Expand All @@ -44,4 +44,4 @@ for font in "${FONTLIST[@]}"; do

echo "$(dirname $font)/OFL.txt"
wget -q -O "assets/fonts/$FONTNAME.LICENSE.txt" "$(dirname $font)/OFL.txt"
done
done

0 comments on commit b6e7797

Please sign in to comment.