summaryrefslogtreecommitdiffhomepage
path: root/gen-fonts
blob: d1f7b7d7952dce4bf3301bd77aeed87edc353862 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash

. /usr/share/nvm/init-nvm.sh

make
mkdir -p src/fonts

uni=`find out -name '*.html' | xargs glyphhanger \
	--cssSelector=':not(code, pre, kbd, samp)'`

pyftsubset /usr/share/fonts/WOFF2/Vollkorn-Regular.woff2 \
	--output-file=src/fonts/vollkorn-regular.woff2 \
	--flavor=woff2 \
	--layout-features-=locl \
	--layout-features+=lnum \
	--unicodes="$uni" \
	--no-hinting \
	--desubroutinize
pyftsubset /usr/share/fonts/WOFF2/Vollkorn-Italic.woff2 \
	--output-file=src/fonts/vollkorn-italic.woff2 \
	--flavor=woff2 \
	--layout-features-=locl \
	--layout-features+=lnum \
	--unicodes="$uni" \
	--no-hinting \
	--desubroutinize

uni=`find out -name '*.html' | xargs glyphhanger \
	--cssSelector='code, pre, kbd, samp, :where(code, pre, kbd, samp) *'`

pyftsubset /usr/share/fonts/iosevka-smooth/woff2-unhinted/iosevka-smooth-regular.woff2 \
	--output-file=src/fonts/iosevka-regular.woff2 \
	--flavor=woff2 \
	--layout-features-=locl \
	--unicodes="$uni" \
	--no-hinting \
	--desubroutinize
pyftsubset /usr/share/fonts/iosevka-smooth/woff2-unhinted/iosevka-smooth-italic.woff2 \
	--output-file=src/fonts/iosevka-italic.woff2 \
	--flavor=woff2 \
	--layout-features-=locl \
	--unicodes="$uni" \
	--no-hinting \
	--desubroutinize