Browse Source

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)
tags/2018-11-09
Vanessa Dannenberg 1 year ago
parent
commit
0f78ef70de
17 changed files with 18 additions and 0 deletions
  1. +18
    -0
      init.lua
  2. BIN
      textures/hdf_81.png
  3. BIN
      textures/hdf_82.png
  4. BIN
      textures/hdf_83.png
  5. BIN
      textures/hdf_84.png
  6. BIN
      textures/hdf_85.png
  7. BIN
      textures/hdf_86.png
  8. BIN
      textures/hdf_87.png
  9. BIN
      textures/hdf_88.png
  10. BIN
      textures/hdf_8a.png
  11. BIN
      textures/hdf_8b.png
  12. BIN
      textures/hdf_8c.png
  13. BIN
      textures/hdf_8d.png
  14. BIN
      textures/hdf_8e.png
  15. BIN
      textures/hdf_8f.png
  16. BIN
      textures/hdf_90.png
  17. BIN
      textures/hdf_91.png

+ 18
- 0
init.lua View File

@@ -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


BIN
textures/hdf_81.png View File

Before After
Width: 15  |  Height: 15  |  Size: 121B

BIN
textures/hdf_82.png View File

Before After
Width: 15  |  Height: 15  |  Size: 143B

BIN
textures/hdf_83.png View File

Before After
Width: 15  |  Height: 15  |  Size: 117B

BIN
textures/hdf_84.png View File

Before After
Width: 15  |  Height: 15  |  Size: 143B

BIN
textures/hdf_85.png View File

Before After
Width: 15  |  Height: 15  |  Size: 119B

BIN
textures/hdf_86.png View File

Before After
Width: 15  |  Height: 15  |  Size: 143B

BIN
textures/hdf_87.png View File

Before After
Width: 15  |  Height: 15  |  Size: 118B

BIN
textures/hdf_88.png View File

Before After
Width: 15  |  Height: 15  |  Size: 146B

BIN
textures/hdf_8a.png View File

Before After
Width: 30  |  Height: 15  |  Size: 137B

BIN
textures/hdf_8b.png View File

Before After
Width: 30  |  Height: 15  |  Size: 157B

BIN
textures/hdf_8c.png View File

Before After
Width: 30  |  Height: 15  |  Size: 133B

BIN
textures/hdf_8d.png View File

Before After
Width: 30  |  Height: 15  |  Size: 170B

BIN
textures/hdf_8e.png View File

Before After
Width: 30  |  Height: 15  |  Size: 138B

BIN
textures/hdf_8f.png View File

Before After
Width: 30  |  Height: 15  |  Size: 162B

BIN
textures/hdf_90.png View File

Before After
Width: 30  |  Height: 15  |  Size: 136B

BIN
textures/hdf_91.png View File

Before After
Width: 30  |  Height: 15  |  Size: 168B

Loading…
Cancel
Save