summaryrefslogtreecommitdiff
path: root/tools/fonts
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-05-01 00:48:35 +0200
committerTor Andersson <tor@ccxvii.net>2021-05-01 00:48:35 +0200
commit156f7f8546890c6406001061dae199f8320ca83b (patch)
tree06b54cbe7f9c2dbc1df83b30421fffcb6bbd6a1a /tools/fonts
parent3d386ba2f16c95e5152052552a3bd571a81bc016 (diff)
downloadserver-156f7f8546890c6406001061dae199f8320ca83b.tar.gz
Add web fonts.
Diffstat (limited to 'tools/fonts')
-rw-r--r--tools/fonts/make_number_font.sh6
-rw-r--r--tools/fonts/make_woff.sh13
2 files changed, 19 insertions, 0 deletions
diff --git a/tools/fonts/make_number_font.sh b/tools/fonts/make_number_font.sh
new file mode 100644
index 0000000..1f85bc3
--- /dev/null
+++ b/tools/fonts/make_number_font.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+#
+# Create CircledNumbers webfont by subsetting the circled numbers from NotoSansJP.
+#
+
+pyftsubset NotoSansJP-Regular.otf --verbose --output-file=CircledNumbers.woff2 --flavor=woff2 --unicodes=U+2776-277b,U+2460-2465 --xml
diff --git a/tools/fonts/make_woff.sh b/tools/fonts/make_woff.sh
new file mode 100644
index 0000000..4001d5f
--- /dev/null
+++ b/tools/fonts/make_woff.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# The latin character set as used by google fonts:
+# UNICODE=U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2190-2193,U+2212,U+2215,U+FEFF,U+FFFD
+
+# Extended with some extra symbols we want:
+UNICODE=U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2190-2193,U+2212,U+2215,U+2500-25ff,U+2600-26ff,U+FEFF,U+FFFD
+
+for F in $*
+do
+ OUT=$(basename $(basename $F .ttf) .otf).woff2
+ pyftsubset $F --verbose --output-file=$OUT --flavor=woff2 --unicodes=$UNICODE
+done