diff --git a/.github/workflows/buildpkg.yml b/.github/workflows/buildpkg.yml
index b13e13e..02a0147 100644
--- a/.github/workflows/buildpkg.yml
+++ b/.github/workflows/buildpkg.yml
@@ -34,12 +34,6 @@ jobs:
buildah config --workingdir /home/dev/ttfautohint ctnr
buildah run ctnr makepkg --noconfirm -si
- - name: install templating tools
- run: |
- python3 -m pip install -U pip setuptools wheel
- python3 -m pip install -r requirements.txt
- printf '%s\n' "$HOME/.local/bin" >>$GITHUB_PATH
-
- name: render PKGBUILDs
run: ./mk/pkgbuilds.sh
@@ -61,9 +55,15 @@ jobs:
printf '%s\n' "${RUNNER_TEMP}/dist/"
ls -lh "${RUNNER_TEMP}/dist/"
+ - name: make release notes
+ run: |
+ printf '%s\n' '`vars.nt`:' '```yaml' >release.md
+ cat vars.nt >>release.md
+ printf '%s\n' '```' >>release.md
+
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ${{ runner.temp }}/dist/*
fail_on_unmatched_files: true
- body_path: private-build-plans.toml
+ body_path: release.md
diff --git a/LICENSE b/LICENSE
index 64b55ca..68a49da 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,15 +1,24 @@
+This is free and unencumbered software released into the public domain.
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- Version 2, December 2004
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
- Copyright (C) 2022 Andy Kluger
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
-
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+For more information, please refer to
diff --git a/README.rst b/README.rst
index 1c4fd6b..630dc7a 100644
--- a/README.rst
+++ b/README.rst
@@ -28,11 +28,11 @@ fork this repo on GitHub, then:
$ git clone
$ cd archbuilder_iosevka
-- configure your font (see the `character variants`_), either by editing ``vars.yml``:
+- configure your font (see the `character variants`_), either by editing ``vars.nt``:
.. code:: console
- $ $EDITOR vars.yml
+ $ $EDITOR vars.nt
or by `Using the Customizer Site`_.
@@ -73,18 +73,20 @@ To use a configuration thus generated with this builder:
- in the customizer, leave the default Family Name ("Iosevka Custom")
- save the generated configuration as ``templates/private-build-plans.toml.wz``
-- in ``vars.yml``'s ``build`` list, ensure the only uncommented item is ``ttf-iosevka-custom-git``,
+- in ``vars.nt``'s ``build`` list, ensure the only uncommented item is ``ttf-iosevka-custom-git``,
with either an editor:
.. code:: console
- $ $EDITOR vars.yml
+ $ $EDITOR vars.nt
- or yamlpath's ``yaml-merge``:
+ or NestedTextTo and yamlpath's ``yaml-merge``:
.. code:: console
+ $ nt2yaml vars.nt >vars.yml
$ yaml-merge -A right -w vars.yml vars.yml <<<'{"build": ["ttf-iosevka-custom-git"]}'
+ $ yaml2nt vars.yml >vars.nt
.. _Iosevka: https://github.com/be5invis/Iosevka/
diff --git a/mk/buildpkg.yml.sh b/mk/buildpkg.yml.sh
index 6f7b794..db3b4be 100755
--- a/mk/buildpkg.yml.sh
+++ b/mk/buildpkg.yml.sh
@@ -10,7 +10,7 @@ fi
pip install -qr requirements.txt
wheezy.template "${gitroot}"/templates/buildpkg.yml.wz \
- "$(yaml-get -p . "${gitroot}"/vars.yml)" \
+ "$(nt2json -s "${gitroot}"/vars.types.nt "${gitroot}"/vars.nt)" \
>"${gitroot}"/.github/workflows/buildpkg.yml
printf '%s\n' "Wrote ${gitroot}/.github/workflows/buildpkg.yml"
diff --git a/mk/pkgbuilds.sh b/mk/pkgbuilds.sh
index 8a67e10..62f56b5 100755
--- a/mk/pkgbuilds.sh
+++ b/mk/pkgbuilds.sh
@@ -14,12 +14,19 @@ pip install -qr requirements.txt
pbp_sha256="$(sha256sum "${gitroot}"/private-build-plans.toml | cut -d ' ' -f 1)"
-build_webfonts="$(yaml-get -p build_webfonts "${gitroot}"/vars.yml)"
-upstream_branch="$(yaml-get -p branch "${gitroot}"/vars.yml)"
+vars="$(mktemp)"
+nt2json -s "${gitroot}"/vars.types.nt "${gitroot}"/vars.nt >"$vars"
-yaml-get -p 'spacings.*' "${gitroot}"/vars.yml | while read -r spacing; do
+build_webfonts="$(yaml-get -p build_webfonts "$vars")"
+upstream_branch="$(yaml-get -p branch "$vars")"
- folder="${gitroot}/pkgs/ttf-iosevka-${spacing}${spacing:+-}custom-git"
+yaml-get -p 'spacings.*' "$vars" | while read -r spacing; do
+
+ 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/mk/private-build-plans.toml.sh b/mk/private-build-plans.toml.sh
index 9c45bc3..a3f46c0 100755
--- a/mk/private-build-plans.toml.sh
+++ b/mk/private-build-plans.toml.sh
@@ -11,7 +11,7 @@ fi
pip install -qr requirements.txt
wheezy.template "${gitroot}"/templates/private-build-plans.toml.wz \
- "$(yaml-get -p . "${gitroot}"/vars.yml)" \
+ "$(nt2json -s "${gitroot}"/vars.types.nt "${gitroot}"/vars.nt)" \
>"${gitroot}"/private-build-plans.toml
printf '%s\n' "Wrote ${gitroot}/private-build-plans.toml"
diff --git a/pkgs/ttf-iosevka-git b/pkgs/ttf-iosevka-git
index 9dd3402..010c53f 160000
--- a/pkgs/ttf-iosevka-git
+++ b/pkgs/ttf-iosevka-git
@@ -1 +1 @@
-Subproject commit 9dd34021e6b6b9ac3c01ad784d20700b383db4f5
+Subproject commit 010c53fcc0a6feef2d28e2e2c7f479b90897a1d3
diff --git a/requirements.in b/requirements.in
index b1b915d..bf12989 100644
--- a/requirements.in
+++ b/requirements.in
@@ -1,2 +1,3 @@
yamlpath>=3.4.0
wheezy.template
+nt2
diff --git a/requirements.txt b/requirements.txt
index 31db93c..8bb2e5d 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,20 @@
-python-dateutil==2.8.2 # via yamlpath
-ruamel-yaml==0.17.21 # via yamlpath
+arrow==1.3.0 # via inform
+attrs==24.2.0 # via cattrs
+cattrs==24.1.0 # via nt2
+exceptiongroup==1.2.2 # via cattrs
+inform==1.31 # via nestedtext
+markdown-it-py==3.0.0 # via rich
+mdurl==0.1.2 # via markdown-it-py
+nestedtext==3.7 # via nt2
+nt2==0.2.6 # via -r requirements.in
+plumbum==1.8.3 # via nt2
+pygments==2.18.0 # via rich
+python-dateutil==2.9.0.post0 # via arrow, yamlpath
+rich==13.8.0 # via nt2
+ruamel-yaml==0.17.21 # via nt2, yamlpath
ruamel-yaml-clib==0.2.8 # via ruamel-yaml
-six==1.16.0 # via python-dateutil
-wheezy-template==3.2.1 # via -r requirements.in
-yamlpath==3.8.1 # via -r requirements.in
+six==1.16.0 # via inform, python-dateutil
+types-python-dateutil==2.9.0.20240906 # via arrow
+typing-extensions==4.12.2 # via cattrs
+wheezy-template==3.2.2 # via -r requirements.in
+yamlpath==3.8.2 # via -r requirements.in, nt2
diff --git a/templates/PKGBUILD.wz b/templates/PKGBUILD.wz
index 61f39e2..c60c604 100644
--- a/templates/PKGBUILD.wz
+++ b/templates/PKGBUILD.wz
@@ -1,8 +1,17 @@
@require(spacing, pbp_sha256, build_webfonts, branch)
@(
- name = '-'.join(filter(None, ('ttf-iosevka', spacing, 'custom')))
- if isinstance(build_webfonts, str):
- build_webfonts = build_webfonts.lower() in ('yes', 'true')
+ name = f"ttf-iosevka-{spacing}-custom"
+ if spacing == 'normal':
+ plan = 'IosevkaCustom'
+ name = 'ttf-iosevka-custom'
+ elif spacing == 'quasi-proportional':
+ plan = 'IosevkaQpCustom'
+ elif spacing == 'quasi-proportional-extension-only':
+ plan = 'IosevkaQpeCustom'
+ elif spacing == 'fontconfig-mono':
+ plan = 'IosevkaFcmCustom'
+ else:
+ plan = f"Iosevka{spacing.title()}Custom"
)\
# Maintainer: Andy Kluger
# Contributor: Markus Weimar
@@ -46,17 +55,17 @@ build () {
cd Iosevka
npm install
npm update
- NO_COLOR=1 npm run build -- @{build_webfonts and 'contents' or 'ttf'}::${_pkgname#*-}
+ NO_COLOR=1 npm run build -- @{build_webfonts and 'contents' or 'ttf'}::@{plan}
}
package () {
install -d "${pkgdir}/usr/share/fonts/TTF"
- install -m644 Iosevka/dist/*/ttf/*.ttf "${pkgdir}/usr/share/fonts/TTF/"
+ install -m644 Iosevka/dist/@{plan}/TTF/*.ttf "${pkgdir}/usr/share/fonts/TTF/"
@if build_webfonts:
install -d "${pkgdir}/usr/share/fonts/WOFF2"
- install -m644 Iosevka/dist/*/woff2/*.woff2 "${pkgdir}/usr/share/fonts/WOFF2/"
+ install -m644 Iosevka/dist/@{plan}/WOFF2/*.woff2 "${pkgdir}/usr/share/fonts/WOFF2/"
printf '%s\n' 'CSS BELOW:'
- cat Iosevka/dist/*/*.css
+ cat Iosevka/dist/@{plan}/*.css
printf '%s\n' 'CSS ABOVE'
@end
install -d "${pkgdir}/usr/share/licenses/${pkgname}"
diff --git a/templates/buildpkg.yml.wz b/templates/buildpkg.yml.wz
index 701b8b3..9415313 100644
--- a/templates/buildpkg.yml.wz
+++ b/templates/buildpkg.yml.wz
@@ -35,12 +35,6 @@ jobs:
buildah config --workingdir /home/dev/ttfautohint ctnr
buildah run ctnr makepkg --noconfirm -si
- - name: install templating tools
- run: |
- python3 -m pip install -U pip setuptools wheel
- python3 -m pip install -r requirements.txt
- printf '%s\n' "$HOME/.local/bin" >>$GITHUB_PATH
-
- name: render PKGBUILDs
run: ./mk/pkgbuilds.sh
@@ -64,9 +58,15 @@ jobs:
ls -lh "${RUNNER_TEMP}/dist/"
@end
+ - name: make release notes
+ run: |
+ printf '%s\n' '`vars.nt`:' '```yaml' >release.md
+ cat vars.nt >>release.md
+ printf '%s\n' '```' >>release.md
+
- name: Release
uses: softprops/action-gh-release@@v1
with:
files: ${{ runner.temp }}/dist/*
fail_on_unmatched_files: true
- body_path: private-build-plans.toml
+ body_path: release.md
diff --git a/templates/private-build-plans.toml.wz b/templates/private-build-plans.toml.wz
index 86ab547..b423374 100644
--- a/templates/private-build-plans.toml.wz
+++ b/templates/private-build-plans.toml.wz
@@ -1,27 +1,83 @@
-@require(charvars, spacings, custom_weights, use_custom_weights)
-@#
+@require(charvars, italic_overrides, spacings, custom_weights, use_custom_weights, contextual_widths, extra_widths)
@(
- if isinstance(use_custom_weights, str):
- use_custom_weights = use_custom_weights.lower() in ('yes', 'true')
+ contextual_widths = str(contextual_widths).lower()
)\
@for spacing in spacings:
@(
- plan = '-'.join(filter(None, ('iosevka', spacing, 'custom')))
- family = plan.replace('-', ' ').title()
+ if spacing == 'normal':
+ plan = 'IosevkaCustom'
+ family = 'Iosevka Custom'
+ elif spacing == 'quasi-proportional':
+ plan = 'IosevkaQpCustom'
+ family = 'Iosevka QP Custom'
+ elif spacing == 'quasi-proportional-extension-only':
+ plan = 'IosevkaQpeCustom'
+ family = 'Iosevka QPE Custom'
+ elif spacing == 'fontconfig-mono':
+ plan = 'IosevkaFcmCustom'
+ family = 'Iosevka FCM Custom'
+ else:
+ plan = f"Iosevka{spacing.title()}Custom"
+ family = f"Iosevka {spacing.title()} Custom"
)\
-@#
-[buildPlans.@plan]
+[buildPlans.@{plan}]
family = "@family"
-export-glyph-names = false
-@if spacing:
+exportGlyphNames = false
+buildTextureFeature = @contextual_widths
spacing = "@spacing"
-@end
[buildPlans.@{plan}.ligations]
inherits = "dlig"
# disables = []
# enables = []
+[buildPlans.@{plan}.widths.Normal]
+shape = 500
+menu = 5
+css = "normal"
+
+@if 'condensed' in extra_widths:
+[buildPlans.@{plan}.widths.Condensed]
+shape = 416
+menu = 3
+css = "condensed"
+
+@end
+@if 'semi-condensed' in extra_widths:
+[buildPlans.@{plan}.widths.SemiCondensed]
+shape = 456
+menu = 4
+css = "semi-condensed"
+
+@end
+@if 'semi-extended' in extra_widths:
+[buildPlans.@{plan}.widths.SemiExtended]
+shape = 548
+menu = 6
+css = "semi-expanded"
+
+@end
+@if 'extended' in extra_widths:
+[buildPlans.@{plan}.widths.Extended]
+shape = 600
+menu = 7
+css = "expanded"
+
+@end
+@if 'extra-extended' in extra_widths:
+[buildPlans.@{plan}.widths.ExtraExtended]
+shape = 658
+menu = 8
+css = "extra-expanded"
+
+@end
+@if 'ultra-extended' in extra_widths:
+[buildPlans.@{plan}.widths.UltraExtended]
+shape = 720
+menu = 9
+css = "ultra-expanded"
+
+@end
# [buildPlans.@{plan}.variants]
# inherits = "ss16"
@@ -32,8 +88,10 @@ inherits = "dlig"
# Override above variants for each slope:
# [buildPlans.@{plan}.variants.upright]
-# [buildPlans.@{plan}.variants.italic]
-# [buildPlans.@{plan}.variants.oblique]
+[buildPlans.@{plan}.variants.italic]
+@for char, style in italic_overrides.items():
+@char = "@style"
+@end
@if use_custom_weights:
@for name, weight in custom_weights.items():
@@ -44,4 +102,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.yml b/vars.nt
similarity index 70%
rename from vars.yml
rename to vars.nt
index dfba5eb..2c61381 100644
--- a/vars.yml
+++ b/vars.nt
@@ -1,28 +1,51 @@
-build: # Uncomment the ones you wish to build
- # - ttf-iosevka-git
+build:
+ # Uncomment the ones you wish to build:
# - ttf-iosevka-custom-git
- ttf-iosevka-term-custom-git
- # - ttf-iosevka-fontconfig-mono-custom-git
- # - ttf-iosevka-fixed-custom-git
# - ttf-iosevka-quasi-proportional-custom-git
+ # - ttf-iosevka-git
+ # - ttf-iosevka-fixed-custom-git
+ # - ttf-iosevka-fontconfig-mono-custom-git
# - ttf-iosevka-quasi-proportional-extension-only-custom-git
-spacings: # No need to change this list
- - '' # some wide glyphs
- - term # fewer wide glyphs
- - fontconfig-mono # no wide glyphs
- - fixed # neither wide glyphs nor ligatures
- - quasi-proportional # "normal" non-mono
- - quasi-proportional-extension-only # "normal" non-mono without making anything narrower (e.g. "i")
+extra_widths:
+ # Uncomment the ones you wish to build:
+ # - condensed
+ # - semi-condensed
+ # - semi-extended
+ # - extended
+ # - extra-extended
+ # - ultra-extended
+ # or none:
+ []
+spacings:
+ # No need to change this list
+ - normal
+ # ^ some wide glyphs
+ - term
+ # ^ fewer wide glyphs
+ - fontconfig-mono
+ # ^ no wide glyphs
+ - fixed
+ # ^ neither wide glyphs nor ligatures
+ - quasi-proportional
+ # ^ non-mono
+ - quasi-proportional-extension-only
+ # ^ non-mono without making anything narrower (e.g. "i" is still wide)
build_webfonts: no
-branch: main
use_custom_weights: yes
+contextual_widths: yes
+branch: main
custom_weights:
- regular:
- default: "400"
- override: "600"
- bold:
- default: "700"
- override: "800"
+ Regular:
+ default: 400
+ override: 600
+ Bold:
+ default: 700
+ override: 800
+italic_overrides:
+ # seven: curly-serifless-crossbar
+ # or none:
+ {}
charvars:
digit-form: old-style
apl-form: enable
@@ -76,22 +99,32 @@ charvars:
x: curly-serifless
y: curly-serifless
z: straight-serifless-with-crossbar
+ capital-eszet: flat-top-serifed
long-s: flat-hook-tailed
eszet: longs-s-lig-tailed-serifless
lower-eth: straight-bar
- lower-thorn: serifed
+ capital-thorn: serifed
+ lower-thorn: serifless
lower-alpha: crossing
+ lower-beta: standard
capital-gamma: bottom-serifed
+ lower-gamma: casual
capital-delta: curly
lower-delta: rounded
lower-iota: tailed-serifed
capital-lambda: curly-top-serifed
lower-lambda: tailed-turn
lower-mu: tailed-serifless
+ lower-nu: casual
lower-xi: flat-top
lower-pi: tailed
lower-tau: flat-tailed
- lower-chi: semi-chancery-straight
+ lower-upsilon: casual-serifless
+ lower-phi: cursive
+ lower-chi: semi-chancery-straight-serifless
+ lower-psi: serifless
+ cyrl-a: single-storey-earless-corner-tailed
+ cyrl-ve: cursive
cyrl-capital-zhe: curly
cyrl-zhe: curly
cyrl-capital-ze: unilateral-serifed
@@ -100,7 +133,9 @@ charvars:
cyrl-ka: curly-serifless
cyrl-el: straight
cyrl-em: slanted-sides-hanging-serifed
+ cyrl-capital-en: top-left-bottom-right-serifed
cyrl-en: tailed-top-left-serifed
+ cyrl-capital-er: open-serifless
cyrl-er: earless-rounded-serifless
cyrl-capital-u: cursive-flat-hook-serifless
cyrl-u: cursive-flat-hook-serifless
@@ -108,37 +143,41 @@ charvars:
cyrl-che: tailed
cyrl-yeri: round
cyrl-yery: round
+ cyrl-capital-e: serifless
+ cyrl-e: serifless
cyrl-capital-ya: straight-motion-serifed
cyrl-ya: straight-tailed-motion-serifed
zero: diamond-unslashed
one: no-base
- two: curly-neck
- three: flat-top
- four: semi-open
- five: oblique-arched
+ two: curly-neck-serifless
+ three: flat-top-serifless
+ four: semi-open-serifless
+ five: oblique-arched-serifless
six: open-contour
seven: curly-serifless
eight: crossing-asymmetric
nine: straight-bar
+ tittle: round
diacritic-dot: round
punctuation-dot: round
+ braille-dot: round
tilde: low
asterisk: turn-hex-high
underscore: high
caret: high
paren: normal
brace: curly
- number-sign: upright-tall
+ number-sign: slanted
ampersand: flat-top
at: fourfold-solid-inner-tall
- dollar: open-cap
+ dollar: slanted-interrupted-cap
percent: rings-segmented-slash
bar: natural-slope
ascii-single-quote: straight
ascii-grave: straight
question: smooth
pilcrow: low
- cent: open-cap
+ cent: slanted-bar-interrupted-cap
partial-derivative: curly-bar
micro-sign: toothed-serifless
guillemet: curly
diff --git a/vars.types.nt b/vars.types.nt
new file mode 100644
index 0000000..f607451
--- /dev/null
+++ b/vars.types.nt
@@ -0,0 +1,4 @@
+boolean:
+ - build_webfonts
+ - use_custom_weights
+ - contextual_widths