aboutsummaryrefslogtreecommitdiffhomepage
path: root/TOOLS
diff options
context:
space:
mode:
authorGravatar Ricardo Constantino <wiiaboo@gmail.com>2017-04-20 16:08:33 +0100
committerGravatar Ricardo Constantino <wiiaboo@gmail.com>2017-04-20 17:40:45 +0100
commit51518ddcf6243b9d4bec2b80e208c80c6d6adad5 (patch)
treeb3312b996dac2f37ddcec78374ce02b635b516b7 /TOOLS
parent1e4d3a2440e94bfb8399e7509e49865583ff85af (diff)
Add script to generate otf from sfdir using fontforge
Uses python scripting on fontforge since native scripting is considered legacy and even Ubuntu Trusty seems to have python scripting.
Diffstat (limited to 'TOOLS')
-rwxr-xr-xTOOLS/gen-osd-font.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/TOOLS/gen-osd-font.sh b/TOOLS/gen-osd-font.sh
new file mode 100755
index 0000000000..6838692c4f
--- /dev/null
+++ b/TOOLS/gen-osd-font.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# This script is expected to be called as TOOLS/gen-osd-font.sh (it will access
+# TOOLS/mpv-osd-symbols.sfdir), and it will write sub/osd_font.otf.
+
+# Needs fontforge with python scripting
+
+fontforge -lang=py -c 'f=open(argv[1]); f.generate(argv[2])' \
+ TOOLS/mpv-osd-symbols.sfdir sub/osd_font.otf