]> git.lizzy.rs Git - signs_lib.git/commitdiff
add arrow symbols to fonts
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>
Tue, 9 Oct 2018 11:49:41 +0000 (07:49 -0400)
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>
Tue, 9 Oct 2018 11:49:41 +0000 (07:49 -0400)
accessible by putting ^1 to ^8 (think "arrow number 1", etc) in your text
for narrow-width arrows (good for "wide font" highway signs), or ^a to ^h
for double-width arrows (good for all of the normal narrow-font signs).

in order, arrows 1 and "a" point up, 2/b points up-and-right, 3/c points
right, and so on, turning clockwise

Any other ^x pair just renders directly (no escape char, sorry)

17 files changed:
init.lua
textures/hdf_81.png [new file with mode: 0644]
textures/hdf_82.png [new file with mode: 0644]
textures/hdf_83.png [new file with mode: 0644]
textures/hdf_84.png [new file with mode: 0644]
textures/hdf_85.png [new file with mode: 0644]
textures/hdf_86.png [new file with mode: 0644]
textures/hdf_87.png [new file with mode: 0644]
textures/hdf_88.png [new file with mode: 0644]
textures/hdf_8a.png [new file with mode: 0644]
textures/hdf_8b.png [new file with mode: 0644]
textures/hdf_8c.png [new file with mode: 0644]
textures/hdf_8d.png [new file with mode: 0644]
textures/hdf_8e.png [new file with mode: 0644]
textures/hdf_8f.png [new file with mode: 0644]
textures/hdf_90.png [new file with mode: 0644]
textures/hdf_91.png [new file with mode: 0644]

index 5d44b2cf29c7a88f69346c9ba3609f3335ea6392..eb78b67eecc6f9c418f9caff66ace40106754f0a 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -387,6 +387,24 @@ local function make_line_texture(line, lineno, pos)
        for word_i, word in ipairs(line) do
                local chars = { }
                local ch_offs = 0
+               word = string.gsub(word, "%^[12345678abcdefgh]", {
+                       ["^1"] = string.char(0x81),
+                       ["^2"] = string.char(0x82),
+                       ["^3"] = string.char(0x83),
+                       ["^4"] = string.char(0x84),
+                       ["^5"] = string.char(0x85),
+                       ["^6"] = string.char(0x86),
+                       ["^7"] = string.char(0x87),
+                       ["^8"] = string.char(0x88),
+                       ["^a"] = string.char(0x8a),
+                       ["^b"] = string.char(0x8b),
+                       ["^c"] = string.char(0x8c),
+                       ["^d"] = string.char(0x8d),
+                       ["^e"] = string.char(0x8e),
+                       ["^f"] = string.char(0x8f),
+                       ["^g"] = string.char(0x90),
+                       ["^h"] = string.char(0x91)
+               })
                local word_l = #word
                local i = 1
                while i <= word_l  do
diff --git a/textures/hdf_81.png b/textures/hdf_81.png
new file mode 100644 (file)
index 0000000..df38787
Binary files /dev/null and b/textures/hdf_81.png differ
diff --git a/textures/hdf_82.png b/textures/hdf_82.png
new file mode 100644 (file)
index 0000000..e769d35
Binary files /dev/null and b/textures/hdf_82.png differ
diff --git a/textures/hdf_83.png b/textures/hdf_83.png
new file mode 100644 (file)
index 0000000..7c8c59a
Binary files /dev/null and b/textures/hdf_83.png differ
diff --git a/textures/hdf_84.png b/textures/hdf_84.png
new file mode 100644 (file)
index 0000000..9af1a9b
Binary files /dev/null and b/textures/hdf_84.png differ
diff --git a/textures/hdf_85.png b/textures/hdf_85.png
new file mode 100644 (file)
index 0000000..a83d4c3
Binary files /dev/null and b/textures/hdf_85.png differ
diff --git a/textures/hdf_86.png b/textures/hdf_86.png
new file mode 100644 (file)
index 0000000..7ca6698
Binary files /dev/null and b/textures/hdf_86.png differ
diff --git a/textures/hdf_87.png b/textures/hdf_87.png
new file mode 100644 (file)
index 0000000..2b0eba0
Binary files /dev/null and b/textures/hdf_87.png differ
diff --git a/textures/hdf_88.png b/textures/hdf_88.png
new file mode 100644 (file)
index 0000000..ebab336
Binary files /dev/null and b/textures/hdf_88.png differ
diff --git a/textures/hdf_8a.png b/textures/hdf_8a.png
new file mode 100644 (file)
index 0000000..eeac2a1
Binary files /dev/null and b/textures/hdf_8a.png differ
diff --git a/textures/hdf_8b.png b/textures/hdf_8b.png
new file mode 100644 (file)
index 0000000..35681f0
Binary files /dev/null and b/textures/hdf_8b.png differ
diff --git a/textures/hdf_8c.png b/textures/hdf_8c.png
new file mode 100644 (file)
index 0000000..bbcd100
Binary files /dev/null and b/textures/hdf_8c.png differ
diff --git a/textures/hdf_8d.png b/textures/hdf_8d.png
new file mode 100644 (file)
index 0000000..e280cd9
Binary files /dev/null and b/textures/hdf_8d.png differ
diff --git a/textures/hdf_8e.png b/textures/hdf_8e.png
new file mode 100644 (file)
index 0000000..c97a758
Binary files /dev/null and b/textures/hdf_8e.png differ
diff --git a/textures/hdf_8f.png b/textures/hdf_8f.png
new file mode 100644 (file)
index 0000000..845f51c
Binary files /dev/null and b/textures/hdf_8f.png differ
diff --git a/textures/hdf_90.png b/textures/hdf_90.png
new file mode 100644 (file)
index 0000000..bafc851
Binary files /dev/null and b/textures/hdf_90.png differ
diff --git a/textures/hdf_91.png b/textures/hdf_91.png
new file mode 100644 (file)
index 0000000..f5d2462
Binary files /dev/null and b/textures/hdf_91.png differ