commit e3d9f6653825d3e4e07ac60627730431bed54e9b Author: Adam Kruszewski Date: Tue Apr 30 13:26:32 2024 +0200 Initial commit diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..a950761 --- /dev/null +++ b/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash +docker run -it --rm -v $PWD:/work fontcc --jCmd=4 ttf::Iosevka +sudo chown -R adam dist/ +./post-process.sh +cp -pr dist/Iosevka/TTF/Iosevka-* ~/.fonts/Iosevka-ttf/ +fc-cache -f diff --git a/post-process.sh b/post-process.sh new file mode 100755 index 0000000..1b20cb1 --- /dev/null +++ b/post-process.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +# Based on: +# https://github.com/sdothum/dotfiles/tree/main/bin/bin/functions/font + +font_loc=./dist/Iosevka/TTF/ + +pushd . +cd $font_loc + +regular=$(ls -1 | grep -Ev 'italic|oblique|extended') +italic=$(ls -1 | grep -E 'italic') + +basefont() { echo $1 | grep -q '[-]italic.ttf' && echo "${1%italic*}regular.ttf" || echo "${1%italic*}.ttf"; } + +# some defaults +ANGLE=${ANGLE:--9} # iosevka italic angle (verify with fontforge).. see font/iosevka +XSHIFT=${XSHIFT:--40} # italic descending capital left side bearing shift + +extended=576 # extended regular shape (slightly tighter than Iosevka defaults) +expanded=600 # maximum terminal source code and proof legibility +shape=$expanded + +# flit t in a regular font and shift to the left of cell +for f in $regular ;do + echo "Flipping t in $f" + echo " +Open(\$1); +Select(0u0074); +HFlip(); +Move($XSHIFT,0); # tweak side bearing towards left +SetWidth($shape); +Generate(\$1); +" | fontforge --quiet --lang=ff --script - $f +done + +# italicize flipped from regular glyph and shift to left of cell + for f in $italic ;do + echo "Flipping t in $f" + echo echo " +Open(\$2); +Select(0u0074); +Italic($ANGLE); +Copy(); +Open(\$1); +Select(0u0074); +Paste(); +Move($XSHIFT,0); # adjust for italic side bearing shift towards left +SetWidth($shape); +Generate(\$1); +" | fontforge --quiet --lang=ff --script - $i $(basefont $i) + done + +# return to the initial directory and exit +popd diff --git a/private-build-plans.toml b/private-build-plans.toml new file mode 100644 index 0000000..9606f56 --- /dev/null +++ b/private-build-plans.toml @@ -0,0 +1,85 @@ +[buildPlans.Iosevka] +family = "Iosevka" +spacing = "normal" +serifs = "sans" +noCvSs = true +exportGlyphNames = false + +[buildPlans.Iosevka.metricOverride] +#ascender=735 +#ascender=750 +cap=735 +ascender=775 +xHeight=530 +leading=1250 +#sb=715 # 800 ? +sb = 'default_sb * 0.800' # '0.715 + +[buildPlans.Iosevka.variants.design] +cyrl-em = "flat-bottom-serifless" +capital-b = "standard-interrupted-serifless" +capital-d = "more-rounded-serifless" +capital-g = "toothless-corner-serifless-hooked" +capital-j = "flat-hook-serifless" +capital-i = "short-serifed" +capital-k = "symmetric-touching-serifless" +capital-p = "open-serifless" +capital-q = "vertical-crossing" +capital-r = "standing-open-serifless" +capital-m = "flat-bottom-serifless" +capital-w = "straight-flat-top-serifless" +a = "double-storey-toothless-corner" +b = "toothless-rounded-serifless" +f = "flat-hook-serifless" +i = "hooky" +j = "flat-hook-serifless" +k = "symmetric-touching-serifless" +l = "hooky" +m = "earless-rounded-double-arch-serifless" +p = "earless-rounded-serifless" +q = "tailed-serifless" +r = "hookless-serifless" +t = "hookless-asymmetric-short-neck2" +u = "toothless-rounded-serifless" +w = "straight-flat-top-serifless" +long-s = "flat-hook-serifless" +eszet = "longs-s-lig-serifless" +lower-iota = "zshaped" +lower-lambda = "tailed-turn" +lower-pi = "tailless" +lower-tau = "tailless" +cyrl-capital-u = "straight-turn-serifless" +cyrl-u = "straight-turn-serifless" +zero = "oval-reverse-slashed" +one = "no-base-long-top-serif" +two = "straight-neck-serifless" +three = "flat-top-serifless" +four = "semi-open-serifless" +five = "oblique-arched-serifless" +six = "straight-bar" +seven = "straight-serifless" +eight = "two-circles" +nine = "straight-bar" +asterisk = "turn-hex-mid" +caret = "low" +ascii-grave = "raised-inverse-comma" +ascii-single-quote = "raised-comma" +paren = "large-contour" +brace = "straight" +guillemet = "straight" +#number-sign = "slanted" +ampersand = "upper-open" +at = "fourfold" +dollar = "interrupted" +cent = "bar-interrupted-cap" +bar = "force-upright" +partial-derivative = "straight-bar" +lig-ltgteq = "slanted" + +[buildPlans.Iosevka.ligations] +inherits = "dlig" + +[buildPlans.Iosevka.widths.Normal] +shape = 600 #default 500 +menu = 5 +css = "normal"