summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-10-09 07:49:41 -0400
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-10-09 07:49:41 -0400
commit0f78ef70de0c6141f269e404ffb28bf5985d87b4 (patch)
treec5ce357c4945e975f3c955623b27acd299c35118
parentfac33e369f337c976c72b46b69db8ba931ba1d91 (diff)
downloadsigns_lib-0f78ef70de0c6141f269e404ffb28bf5985d87b4.tar
signs_lib-0f78ef70de0c6141f269e404ffb28bf5985d87b4.tar.gz
signs_lib-0f78ef70de0c6141f269e404ffb28bf5985d87b4.tar.bz2
signs_lib-0f78ef70de0c6141f269e404ffb28bf5985d87b4.tar.xz
signs_lib-0f78ef70de0c6141f269e404ffb28bf5985d87b4.zip
add arrow symbols to fonts
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)
-rw-r--r--init.lua18
-rw-r--r--textures/hdf_81.pngbin0 -> 121 bytes
-rw-r--r--textures/hdf_82.pngbin0 -> 143 bytes
-rw-r--r--textures/hdf_83.pngbin0 -> 117 bytes
-rw-r--r--textures/hdf_84.pngbin0 -> 143 bytes
-rw-r--r--textures/hdf_85.pngbin0 -> 119 bytes
-rw-r--r--textures/hdf_86.pngbin0 -> 143 bytes
-rw-r--r--textures/hdf_87.pngbin0 -> 118 bytes
-rw-r--r--textures/hdf_88.pngbin0 -> 146 bytes
-rw-r--r--textures/hdf_8a.pngbin0 -> 137 bytes
-rw-r--r--textures/hdf_8b.pngbin0 -> 157 bytes
-rw-r--r--textures/hdf_8c.pngbin0 -> 133 bytes
-rw-r--r--textures/hdf_8d.pngbin0 -> 170 bytes
-rw-r--r--textures/hdf_8e.pngbin0 -> 138 bytes
-rw-r--r--textures/hdf_8f.pngbin0 -> 162 bytes
-rw-r--r--textures/hdf_90.pngbin0 -> 136 bytes
-rw-r--r--textures/hdf_91.pngbin0 -> 168 bytes
17 files changed, 18 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 5d44b2c..eb78b67 100644
--- 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
index 0000000..df38787
--- /dev/null
+++ b/textures/hdf_81.png
Binary files differ
diff --git a/textures/hdf_82.png b/textures/hdf_82.png
new file mode 100644
index 0000000..e769d35
--- /dev/null
+++ b/textures/hdf_82.png
Binary files differ
diff --git a/textures/hdf_83.png b/textures/hdf_83.png
new file mode 100644
index 0000000..7c8c59a
--- /dev/null
+++ b/textures/hdf_83.png
Binary files differ
diff --git a/textures/hdf_84.png b/textures/hdf_84.png
new file mode 100644
index 0000000..9af1a9b
--- /dev/null
+++ b/textures/hdf_84.png
Binary files differ
diff --git a/textures/hdf_85.png b/textures/hdf_85.png
new file mode 100644
index 0000000..a83d4c3
--- /dev/null
+++ b/textures/hdf_85.png
Binary files differ
diff --git a/textures/hdf_86.png b/textures/hdf_86.png
new file mode 100644
index 0000000..7ca6698
--- /dev/null
+++ b/textures/hdf_86.png
Binary files differ
diff --git a/textures/hdf_87.png b/textures/hdf_87.png
new file mode 100644
index 0000000..2b0eba0
--- /dev/null
+++ b/textures/hdf_87.png
Binary files differ
diff --git a/textures/hdf_88.png b/textures/hdf_88.png
new file mode 100644
index 0000000..ebab336
--- /dev/null
+++ b/textures/hdf_88.png
Binary files differ
diff --git a/textures/hdf_8a.png b/textures/hdf_8a.png
new file mode 100644
index 0000000..eeac2a1
--- /dev/null
+++ b/textures/hdf_8a.png
Binary files differ
diff --git a/textures/hdf_8b.png b/textures/hdf_8b.png
new file mode 100644
index 0000000..35681f0
--- /dev/null
+++ b/textures/hdf_8b.png
Binary files differ
diff --git a/textures/hdf_8c.png b/textures/hdf_8c.png
new file mode 100644
index 0000000..bbcd100
--- /dev/null
+++ b/textures/hdf_8c.png
Binary files differ
diff --git a/textures/hdf_8d.png b/textures/hdf_8d.png
new file mode 100644
index 0000000..e280cd9
--- /dev/null
+++ b/textures/hdf_8d.png
Binary files differ
diff --git a/textures/hdf_8e.png b/textures/hdf_8e.png
new file mode 100644
index 0000000..c97a758
--- /dev/null
+++ b/textures/hdf_8e.png
Binary files differ
diff --git a/textures/hdf_8f.png b/textures/hdf_8f.png
new file mode 100644
index 0000000..845f51c
--- /dev/null
+++ b/textures/hdf_8f.png
Binary files differ
diff --git a/textures/hdf_90.png b/textures/hdf_90.png
new file mode 100644
index 0000000..bafc851
--- /dev/null
+++ b/textures/hdf_90.png
Binary files differ
diff --git a/textures/hdf_91.png b/textures/hdf_91.png
new file mode 100644
index 0000000..f5d2462
--- /dev/null
+++ b/textures/hdf_91.png
Binary files differ