abouttreesummaryrefslogcommitdiff
path: root/srcs/special_font/build.pe
diff options
context:
space:
mode:
authorJules Aguillon2022-03-17 20:08:26 +0100
committerJules Aguillon2022-03-17 20:23:28 +0100
commite63ff8f837947d574cc2da0c764b564302580343 (patch)
tree75eeb508c5835084ae4cac23662242d3d1bffd53 /srcs/special_font/build.pe
parentfe35d5fd5a96d995e0ff434718b7b2b8bcac5ba5 (diff)
downloadunexpected-keyboard-e63ff8f837947d574cc2da0c764b564302580343.tar.gz
unexpected-keyboard-e63ff8f837947d574cc2da0c764b564302580343.zip
Stateless build of the special font file
Keep the glyphs in SVG format and build the font using a FontForge script. A part of the previous font is kept because the sources is lost. This adds a new dependency to the build system, fontforge.
Diffstat (limited to 'srcs/special_font/build.pe')
-rw-r--r--srcs/special_font/build.pe15
1 files changed, 15 insertions, 0 deletions
diff --git a/srcs/special_font/build.pe b/srcs/special_font/build.pe
new file mode 100644
index 0000000..fab828b
--- /dev/null
+++ b/srcs/special_font/build.pe
@@ -0,0 +1,15 @@
+# The special font is used for the symbols of some keys. It is built from SVG
+# files, one for each glyph.
+
+# Starts from an existing font file for glyphs that don't have SVG sources yet.
+Open($2)
+
+# Imports glyphs, file name is position in the font.
+i = 3
+while (i < $argc)
+ Select(Strtol($argv[i]:t:r))
+ Import($argv[i])
+ i++
+endloop
+
+Generate($1)