Compare commits
No commits in common. "ec4724651d8bf6e445f5fefc38138c5838589021" and "20583cbeeb17d6db5ed6fa0b78f6b1680b0e19aa" have entirely different histories.
ec4724651d
...
20583cbeeb
2 changed files with 27 additions and 67 deletions
67
vascadia.sh
67
vascadia.sh
|
@ -1,67 +0,0 @@
|
||||||
#!/usr/bin/env zsh
|
|
||||||
###
|
|
||||||
# https://github.com/microsoft/cascadia-code
|
|
||||||
# ss01 - handwritten italic
|
|
||||||
# ss02 - lua not equals ~=
|
|
||||||
# ss03 - serbian locale
|
|
||||||
# ss19 - slashed zero 0
|
|
||||||
# ss20 - graphical control characters
|
|
||||||
###
|
|
||||||
# opentype-feature-freezer is necessary, install with pipx or pip
|
|
||||||
# pip install --upgrade opentype-feature-freezer
|
|
||||||
###
|
|
||||||
# This script generates an archive with "baked in" stylistic sets
|
|
||||||
# for the best compatibility.
|
|
||||||
###
|
|
||||||
|
|
||||||
VERSION=2407.24
|
|
||||||
|
|
||||||
NAME=Vascadia
|
|
||||||
WDIR=$HOME/vascadia
|
|
||||||
|
|
||||||
SS=ss01,ss02,ss19,ss20
|
|
||||||
|
|
||||||
SRC=CascadiaCode-$VERSION.zip
|
|
||||||
URL=https://github.com/microsoft/cascadia-code/releases/download/v$VERSION/$SRC
|
|
||||||
|
|
||||||
function prep {
|
|
||||||
typeset archive=$WDIR/$SRC
|
|
||||||
mkdir -p $WDIR
|
|
||||||
[[ -r $archive ]] || wget -P $WDIR $URL
|
|
||||||
unzip $archive 'otf/**' -d $WDIR
|
|
||||||
}
|
|
||||||
|
|
||||||
function venv {
|
|
||||||
typeset venv_dir=$WDIR/.venv
|
|
||||||
python3 -m venv $venv_dir
|
|
||||||
source $venv_dir/bin/activate
|
|
||||||
pip install --upgrade pip opentype-feature-freezer
|
|
||||||
}
|
|
||||||
|
|
||||||
function convert {
|
|
||||||
typeset dst_dir=$WDIR/$NAME
|
|
||||||
mkdir -p $dst_dir
|
|
||||||
while read -r src; do
|
|
||||||
# an ugly hack to replace C with V, don't judge me
|
|
||||||
dst=V${src##*/C}
|
|
||||||
|
|
||||||
pyftfeatfreeze -f $SS -R Cascadia/$NAME $src $dst_dir/$dst
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
function cleanup {
|
|
||||||
typeset source=$WDIR/$NAME
|
|
||||||
typeset archive=$source-$VERSION.zip
|
|
||||||
zip -rv $archive $source
|
|
||||||
rm -rv $source $WDIR/otf
|
|
||||||
}
|
|
||||||
|
|
||||||
function main {
|
|
||||||
set -ex
|
|
||||||
prep
|
|
||||||
venv
|
|
||||||
convert < <(find $WDIR/otf -type f -name '*.otf')
|
|
||||||
cleanup
|
|
||||||
}
|
|
||||||
|
|
||||||
main $@
|
|
27
vcascadia-gen.sh
Executable file
27
vcascadia-gen.sh
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
###
|
||||||
|
# https://github.com/microsoft/cascadia-code
|
||||||
|
# ss01 - handwritten italic
|
||||||
|
# ss02 - lua not equals ~=
|
||||||
|
# ss03 - serbian locale
|
||||||
|
# ss19 - slashed zero 0
|
||||||
|
# ss20 - graphical control characters
|
||||||
|
###
|
||||||
|
# opentype-feature-freezer is necessary, install with pipx or pip
|
||||||
|
# pipx install --upgrade opentype-feature-freezer
|
||||||
|
###
|
||||||
|
|
||||||
|
title='Cascadia Mono NF'
|
||||||
|
orig=CascadiaMonoNF
|
||||||
|
name=VascadiaMod
|
||||||
|
arch=$name.tgz
|
||||||
|
ss=ss01,ss19,ss20
|
||||||
|
|
||||||
|
for font in $orig*.otf; do
|
||||||
|
src=$font
|
||||||
|
dst=${font/$orig/$name}
|
||||||
|
|
||||||
|
pyftfeatfreeze -f $ss -R "$title/$name" $src $dst
|
||||||
|
done
|
||||||
|
|
||||||
|
eval tar -acvf $arch $name*
|
Loading…
Add table
Add a link
Reference in a new issue