Skip to content

Commit

Permalink
Adjust spacing and plan naming for upcoming v28
Browse files Browse the repository at this point in the history
  • Loading branch information
AndydeCleyre committed Nov 14, 2023
1 parent 85cbd12 commit 4068fee
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 15 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/buildpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion mk/pkgbuilds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions templates/PKGBUILD.wz
Original file line number Diff line number Diff line change
@@ -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 <https://t.me/andykluger>
Expand Down
31 changes: 25 additions & 6 deletions templates/private-build-plans.toml.wz
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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():
Expand All @@ -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
16 changes: 8 additions & 8 deletions vars.nt
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 4068fee

Please sign in to comment.