diff --git a/.gitignore b/.gitignore index 21f99763b..9161e2273 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors # SPDX-FileCopyrightText: 2016 ownCloud, Inc. # SPDX-License-Identifier: AGPL-3.0-or-later -/assets/fonts +/fonts tests/clover.xml .idea node_modules/ diff --git a/REUSE.toml b/REUSE.toml index 3e3f22394..f9e02b068 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -6,7 +6,7 @@ SPDX-PackageSupplier = "Nextcloud " SPDX-PackageDownloadLocation = "https://github.com/nextcloud/richdocuments" [[annotations]] -path = [".gitattributes", ".github/issue_template.md", ".github/CODEOWNERS", ".editorconfig", "package-lock.json", "package.json", "composer.json", "composer.lock", "**/composer.json", "**/composer.lock", ".l10nignore", "cypress/tsconfig.json", "vendor-bin/**/composer.json", "vendor-bin/**/composer.lock", ".tx/config", "tsconfig.json", "js/vendor.LICENSE.txt", "krankerl.toml", ".npmignore", ".nextcloudignore", ".eslintrc.json", ".tx/backport", "assets/fonts/.gitkeep"] +path = [".gitattributes", ".github/issue_template.md", ".github/CODEOWNERS", ".editorconfig", "package-lock.json", "package.json", "composer.json", "composer.lock", "**/composer.json", "**/composer.lock", ".l10nignore", "cypress/tsconfig.json", "vendor-bin/**/composer.json", "vendor-bin/**/composer.lock", ".tx/config", "tsconfig.json", "js/vendor.LICENSE.txt", "krankerl.toml", ".npmignore", ".nextcloudignore", ".eslintrc.json", ".tx/backport", "fonts/.gitkeep"] precedence = "aggregate" SPDX-FileCopyrightText = "none" SPDX-License-Identifier = "CC0-1.0" diff --git a/build/download-fonts.sh b/build/download-fonts.sh index bbe60246b..ac99e9573 100755 --- a/build/download-fonts.sh +++ b/build/download-fonts.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Download font files and put them into the assets/fonts folder for the release +# Download font files and put them into the fonts folder for the release # SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors # SPDX-License-Identifier: AGPL-3.0-or-later FONTLIST=( @@ -22,20 +22,20 @@ FONTLIST=( "https://github.com/google/fonts/raw/main/ofl/spectral/Spectral-Regular.ttf" ) -rm assets/fonts/* +rm fonts/* function urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; } for font in "${FONTLIST[@]}"; do echo "$font" - wget -q -P assets/fonts/ $font + wget -q -P 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') - mv assets/fonts/$FILENAME assets/fonts/$NEWFILENAME + mv fonts/$FILENAME fonts/$NEWFILENAME else NEWFILENAME=$(echo $FILENAME) fi @@ -44,5 +44,5 @@ for font in "${FONTLIST[@]}"; do FONTNAME=$(echo $NEWFILENAME | sed 's/.ttf//g') echo "$(dirname $font)/OFL.txt" - wget -q -O "assets/fonts/$FONTNAME.LICENSE.txt" "$(dirname $font)/OFL.txt" + wget -q -O "fonts/$FONTNAME.LICENSE.txt" "$(dirname $font)/OFL.txt" done diff --git a/assets/fonts/.gitkeep b/fonts/.gitkeep similarity index 100% rename from assets/fonts/.gitkeep rename to fonts/.gitkeep diff --git a/assets/fonts/AmaticSC-Regular.ttf b/fonts/AmaticSC-Regular.ttf similarity index 100% rename from assets/fonts/AmaticSC-Regular.ttf rename to fonts/AmaticSC-Regular.ttf diff --git a/assets/fonts/AmaticSC-Regular.ttf.license b/fonts/AmaticSC-Regular.ttf.license similarity index 100% rename from assets/fonts/AmaticSC-Regular.ttf.license rename to fonts/AmaticSC-Regular.ttf.license diff --git a/lib/Service/FontService.php b/lib/Service/FontService.php index 621697b1f..be170d3fd 100644 --- a/lib/Service/FontService.php +++ b/lib/Service/FontService.php @@ -213,7 +213,7 @@ class FontService { * @throws Exception */ public function installDefaultFonts(): void { - $dirPath = __DIR__ . '/../../assets/fonts'; + $dirPath = __DIR__ . '/../../fonts'; if (!is_dir($dirPath)) { throw new Exception("Directory \"$dirPath\" does not exist!");