Merge pull request #220 from storytold/pr/craft-fonts

Fonts: use craft-fonts as an optional build input; move the Japanese fonts out
This commit is contained in:
Brandon Thomas authored and GitHub committed 2026-10-06 14:37:41 -04:00
commit 856e36c694
22 files changed
+364 -111

No files matched your search

+13
View File
@@ -50,6 +50,19 @@ copy_docs() {
for f in README.md LICENSE LICENSE-MIT LICENSE-APACHE COPYRIGHT; do
if [ -f "$ROOT/$f" ]; then cp "$ROOT/$f" "$dest/"; fi
done
copy_font_licences "$dest"
}
# Built with craft-fonts (CRAFT_FONTS_DIR, set by release.yml): the embedded fonts' licences go with
# the package, as OFL-<family dir>.txt. Nothing to do without it.
copy_font_licences() {
local dest="$1" ofl family
[ -n "${CRAFT_FONTS_DIR:-}" ] || return 0
for ofl in "$CRAFT_FONTS_DIR"/fonts/*/OFL.txt; do
[ -f "$ofl" ] || continue
family="$(basename "$(dirname "$ofl")")"
cp "$ofl" "$dest/OFL-$family.txt"
done
}
# Portable SHA-256 of a file (prints just the hash).
+2
View File
@@ -108,6 +108,8 @@ sed -e "s/@VERSION@/$VERSION/g" -e "s/@SHORT_VERSION@/$SHORT_VERSION/g" \
"$HERE/Info.plist.in" >"$APP/Contents/Info.plist"
plutil -lint "$APP/Contents/Info.plist"
printf 'APPL????' >"$APP/Contents/PkgInfo"
# The licences of the craft-fonts fonts embedded in the binary (release builds).
copy_font_licences "$APP/Contents/Resources"
# Sign inside-out: nested code first, then the bundle itself (no --deep on the final signature).
# Today the only nested code is the main executable; frameworks/helpers would be signed here too.
+6
View File
@@ -110,6 +110,12 @@ foreach ($f in 'README.md', 'LICENSE', 'LICENSE-MIT', 'LICENSE-APACHE') {
$p = Join-Path $Root $f
if (Test-Path $p) { Copy-Item $p $Portable }
}
# Built with craft-fonts (CRAFT_FONTS_DIR, release builds): the embedded fonts' licences.
if ($env:CRAFT_FONTS_DIR) {
foreach ($ofl in Get-ChildItem -Path (Join-Path $env:CRAFT_FONTS_DIR 'fonts\*\OFL.txt') -ErrorAction SilentlyContinue) {
Copy-Item $ofl.FullName (Join-Path $Portable "OFL-$($ofl.Directory.Name).txt")
}
}
$Zip = Join-Path $Dist "vectorcraft-$Version-windows-$Arch-portable.zip"
Remove-Item -Force $Zip -ErrorAction SilentlyContinue
Compress-Archive -Path $Portable -DestinationPath $Zip