From 4068fee734ec1e4b6ae4d08438ef7c86c7ccadc4 Mon Sep 17 00:00:00 2001 From: Andy Kluger Date: Tue, 14 Nov 2023 00:32:08 -0500 Subject: [PATCH] Adjust spacing and plan naming for upcoming v28 --- .github/workflows/buildpkg.yml | 18 ++++++++++++++++ mk/pkgbuilds.sh | 6 +++++- templates/PKGBUILD.wz | 2 ++ templates/private-build-plans.toml.wz | 31 +++++++++++++++++++++------ vars.nt | 16 +++++++------- 5 files changed, 58 insertions(+), 15 deletions(-) diff --git a/.github/workflows/buildpkg.yml b/.github/workflows/buildpkg.yml index c8225cd..6e9003a 100644 --- a/.github/workflows/buildpkg.yml +++ b/.github/workflows/buildpkg.yml @@ -37,6 +37,24 @@ jobs: - name: render PKGBUILDs run: ./mk/pkgbuilds.sh + - name: copy ttf-iosevka-custom-git PKGBUILD into build ctnr + run: | + buildah copy --chown dev ctnr pkgs/ttf-iosevka-custom-git /home/dev/ttf-iosevka-custom-git + + - name: build and siphon ttf-iosevka-custom-git from build ctnr + run: | + buildah config -u dev --workingdir /home/dev/ttf-iosevka-custom-git ctnr + buildah run ctnr makepkg --noconfirm -s + + buildah run ctnr ls -lh + + pkg="$(buildah run ctnr sh -c "printf '%s\n' *.pkg.*")" + mkdir -p "${RUNNER_TEMP}/dist" + buildah run ctnr cat "$pkg" >"${RUNNER_TEMP}/dist/${pkg}" + + printf '%s\n' "${RUNNER_TEMP}/dist/" + ls -lh "${RUNNER_TEMP}/dist/" + - name: copy ttf-iosevka-term-custom-git PKGBUILD into build ctnr run: | buildah copy --chown dev ctnr pkgs/ttf-iosevka-term-custom-git /home/dev/ttf-iosevka-term-custom-git diff --git a/mk/pkgbuilds.sh b/mk/pkgbuilds.sh index c3e692e..62f56b5 100755 --- a/mk/pkgbuilds.sh +++ b/mk/pkgbuilds.sh @@ -22,7 +22,11 @@ upstream_branch="$(yaml-get -p branch "$vars")" yaml-get -p 'spacings.*' "$vars" | while read -r spacing; do - folder="${gitroot}/pkgs/ttf-iosevka-${spacing}${spacing:+-}custom-git" + if [ "$spacing" = normal ]; then + folder="${gitroot}/pkgs/ttf-iosevka-custom-git" + else + folder="${gitroot}/pkgs/ttf-iosevka-${spacing}-custom-git" + fi mkdir -p "$folder" cp "${gitroot}"/private-build-plans.toml "${folder}"/private-build-plans.toml.example diff --git a/templates/PKGBUILD.wz b/templates/PKGBUILD.wz index 459376a..d08b909 100644 --- a/templates/PKGBUILD.wz +++ b/templates/PKGBUILD.wz @@ -1,5 +1,7 @@ @require(spacing, pbp_sha256, build_webfonts, branch) @( + if spacing == 'normal': + spacing = '' name = '-'.join(filter(None, ('ttf-iosevka', spacing, 'custom'))) )\ # Maintainer: Andy Kluger diff --git a/templates/private-build-plans.toml.wz b/templates/private-build-plans.toml.wz index f1b0f25..dd37ef2 100644 --- a/templates/private-build-plans.toml.wz +++ b/templates/private-build-plans.toml.wz @@ -5,17 +5,19 @@ )\ @for spacing in spacings: @( - plan = '-'.join(filter(None, ('iosevka', spacing, 'custom'))) - family = plan.replace('-', ' ').title() + if spacing == 'normal': + plan = 'IosevkaCustom' + family = 'Iosevka Custom' + else: + plan = f"Iosevka{spacing.title()}Custom" + family = f"Iosevka {spacing.title()} Custom" )\ @# -[buildPlans.@plan] +[buildPlans.@{plan}] family = "@family" exportGlyphNames = false buildTextureFeature = @contextual_widths -@if spacing: spacing = "@spacing" -@end [buildPlans.@{plan}.ligations] inherits = "dlig" @@ -33,7 +35,6 @@ inherits = "dlig" # Override above variants for each slope: # [buildPlans.@{plan}.variants.upright] # [buildPlans.@{plan}.variants.italic] -# [buildPlans.@{plan}.variants.oblique] @if use_custom_weights: @for name, weight in custom_weights.items(): @@ -44,4 +45,22 @@ css = @weight['default'] @end @end +[buildPlans.@{plan}.slopes.Upright] +angle = 0 +shape = "upright" +menu = "upright" +css = "normal" + +# [buildPlans.@{plan}.slopes.Oblique] +# angle = 9.4 +# shape = "oblique" +# menu = "oblique" +# css = "oblique" + +[buildPlans.@{plan}.slopes.Italic] +angle = 9.4 +shape = "italic" +menu = "italic" +css = "italic" + @end diff --git a/vars.nt b/vars.nt index 1000566..09e6ef1 100644 --- a/vars.nt +++ b/vars.nt @@ -1,26 +1,26 @@ build: # Uncomment the ones you wish to build + - ttf-iosevka-custom-git - ttf-iosevka-term-custom-git - ttf-iosevka-quasi-proportional-extension-only-custom-git # - ttf-iosevka-git - # - ttf-iosevka-custom-git # - ttf-iosevka-fontconfig-mono-custom-git # - ttf-iosevka-fixed-custom-git # - ttf-iosevka-quasi-proportional-custom-git spacings: # No need to change this list - - - # (empty space) some wide glyphs + - normal + # ^ some wide glyphs - term - # fewer wide glyphs + # ^ fewer wide glyphs - fontconfig-mono - # no wide glyphs + # ^ no wide glyphs - fixed - # neither wide glyphs nor ligatures + # ^ neither wide glyphs nor ligatures - quasi-proportional - # "normal" non-mono + # ^ non-mono - quasi-proportional-extension-only - # "normal" non-mono without making anything narrower (e.g. "i") + # ^ non-mono without making anything narrower (e.g. "i" is still wide) build_webfonts: no use_custom_weights: yes contextual_widths: yes