From 0f78ef70de0c6141f269e404ffb28bf5985d87b4 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Tue, 9 Oct 2018 07:49:41 -0400 Subject: [PATCH] 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) --- init.lua | 18 ++++++++++++++++++ textures/hdf_81.png | Bin 0 -> 121 bytes textures/hdf_82.png | Bin 0 -> 143 bytes textures/hdf_83.png | Bin 0 -> 117 bytes textures/hdf_84.png | Bin 0 -> 143 bytes textures/hdf_85.png | Bin 0 -> 119 bytes textures/hdf_86.png | Bin 0 -> 143 bytes textures/hdf_87.png | Bin 0 -> 118 bytes textures/hdf_88.png | Bin 0 -> 146 bytes textures/hdf_8a.png | Bin 0 -> 137 bytes textures/hdf_8b.png | Bin 0 -> 157 bytes textures/hdf_8c.png | Bin 0 -> 133 bytes textures/hdf_8d.png | Bin 0 -> 170 bytes textures/hdf_8e.png | Bin 0 -> 138 bytes textures/hdf_8f.png | Bin 0 -> 162 bytes textures/hdf_90.png | Bin 0 -> 136 bytes textures/hdf_91.png | Bin 0 -> 168 bytes 17 files changed, 18 insertions(+) create mode 100644 textures/hdf_81.png create mode 100644 textures/hdf_82.png create mode 100644 textures/hdf_83.png create mode 100644 textures/hdf_84.png create mode 100644 textures/hdf_85.png create mode 100644 textures/hdf_86.png create mode 100644 textures/hdf_87.png create mode 100644 textures/hdf_88.png create mode 100644 textures/hdf_8a.png create mode 100644 textures/hdf_8b.png create mode 100644 textures/hdf_8c.png create mode 100644 textures/hdf_8d.png create mode 100644 textures/hdf_8e.png create mode 100644 textures/hdf_8f.png create mode 100644 textures/hdf_90.png create mode 100644 textures/hdf_91.png 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 0000000000000000000000000000000000000000..df38787a7221601d4722d6ede55c7cfd8e0c814a GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0vp^{2Lhkm=&{heMD`IwS&J! r;(n*E>rV<6SXG=6|Hk}3o|8d8RZUbm__fh}pbZS3u6{1-oD!MFVdQ&MBb@0I`WCw*UYD literal 0 HcmV?d00001 diff --git a/textures/hdf_84.png b/textures/hdf_84.png new file mode 100644 index 0000000000000000000000000000000000000000..9af1a9b35e6123528703748c9039209794a20016 GIT binary patch literal 143 zcmeAS@N?(olHy`uVBq!ia0vp^{22i{Qv)X zPU9{nE?!qYCxb}i!_x))Z!C1R=zRR7i!+a@&N_PW0yTD(nTypbw}scO;o#i9K7aj_ r{Z5Lu(}UDcdRLV8Z7tB^xl@LnJOIr~EkIz#}0kF~N0) zfl8u^SSF9dOcUiRiaile{t4&)sL!eLEVxzgvsb0^jlEj;l7yfA@3@$DF*=p=h^j}) RUI&`Q;OXk;vd$@?2>^GEB=Z0O literal 0 HcmV?d00001 diff --git a/textures/hdf_86.png b/textures/hdf_86.png new file mode 100644 index 0000000000000000000000000000000000000000..7ca6698f75d35c0a14b67b2463950a2d641498af GIT binary patch literal 143 zcmeAS@N?(olHy`uVBq!ia0vp^{2$yb*ok_GA0;_4*fMW|@j9iz`}60c~LLboFyt=akR{0C`C^djJ3c literal 0 HcmV?d00001 diff --git a/textures/hdf_87.png b/textures/hdf_87.png new file mode 100644 index 0000000000000000000000000000000000000000..2b0eba0a818f875efb2c6b5975172ce3587a77a3 GIT binary patch literal 118 zcmeAS@N?(olHy`uVBq!ia0vp^{2To*j!L-Y}krv~nf43!`F_?6ae RwgMW&;OXk;vd$@?2>|$wCnEp= literal 0 HcmV?d00001 diff --git a/textures/hdf_88.png b/textures/hdf_88.png new file mode 100644 index 0000000000000000000000000000000000000000..ebab3365e51f99ede239bcc94e77b6c55393ecaa GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0vp^{2K4 zsoyV%s%^157*QxR;lo0vBUAS>vV5`WndDHjPFaQVOh~cf)zUL_!@t-b&x$SuPeCrOE`uKxZXXbFR-tDnm{r-UW|*Qq$B literal 0 HcmV?d00001 diff --git a/textures/hdf_8a.png b/textures/hdf_8a.png new file mode 100644 index 0000000000000000000000000000000000000000..eeac2a1cc072da98f49f74cb6002ea80ef93b695 GIT binary patch literal 137 zcmeAS@N?(olHy`uVBq!ia0vp^azM<_!2%>BH*XgQQURVWjv*T7&rY)DVld!vo_y#3 zxw2Q6el7Jj?r@XW@Q^SP>`)I`WX+do6)Bt+Bx)e-$FTYNs$MHu-V3W&3s(7X@F)GS lf6iz2cY~Atp|DsUo#V6EG;8(?v;fU!@O1TaS?83{1ON@YDo_9b literal 0 HcmV?d00001 diff --git a/textures/hdf_8b.png b/textures/hdf_8b.png new file mode 100644 index 0000000000000000000000000000000000000000..35681f065d3d229067d32cce025f2c6e6c247394 GIT binary patch literal 157 zcmeAS@N?(olHy`uVBq!ia0vp^azM<_!2%>BH*XgQQYoG;jv*T7mrn8)I-tPe?AiW1 z-tt|PtH6pi5^DON1f71$-n#PmY(%r+%jr#O|1O4nNswvq-EhFAoblPrGYrAWAF6tI z-uOhZUbYr@*tLPZDgLgt^AFDhXB(F1Hk-Yiw@SD_<_JShwXACJ?#fc2eGHzielF{r G5}E+OGCDW_ literal 0 HcmV?d00001 diff --git a/textures/hdf_8c.png b/textures/hdf_8c.png new file mode 100644 index 0000000000000000000000000000000000000000..bbcd1002e0b815b1585f90f4ec1859b5bcf3eb68 GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^azM<_!2%>BH*XgQQa+w8jv*T7_XeHjV^H8|diMXn z(cRg4y}J2U@(luqighFeUFR|sI3L~8=)Uge)0&x^PRmTX${Lj3x^x@s?&W2UhG|Tt i|8izNY2Uu~A@BStfv91J~%i!ti=d#Wzp$Py_cP_pF literal 0 HcmV?d00001 diff --git a/textures/hdf_8d.png b/textures/hdf_8d.png new file mode 100644 index 0000000000000000000000000000000000000000..e280cd95027fe49011b30f4dfd0d2a14a0090188 GIT binary patch literal 170 zcmeAS@N?(olHy`uVBq!ia0vp^azM<_!2%>BH*XgQQiYx_jv*T7mj*}k9Z=xN=Ka3k z==Y6jjwefe_I2E159K`me$$1^TO&pCQBH*XgQQh}Z>jv*T7k4`e=V^H8=Zv6j$ z=elE43i#aAROYSamF!wq^!n{urx%q{i2?r~*evom@S-!fFm}04SJmyLjPL0iGYxtF nCpdQRiWTzJ6gjbtw}A2VQxV?z(_T9R4QKFl^>bP0l+XkKe{V4x literal 0 HcmV?d00001 diff --git a/textures/hdf_8f.png b/textures/hdf_8f.png new file mode 100644 index 0000000000000000000000000000000000000000..845f51cce9ad684b9091e901fbd7dd7fbbfc64dc GIT binary patch literal 162 zcmeAS@N?(olHy`uVBq!ia0vp^azM<_!2%>BH*XgQQkkAEjv*T7mrn8)I-tPe?0Nim zyk%^Jn`^)pos!Asobnt`cb)2-vBG{ylu`lPSHlGT4|6Xv6tK66F&+~+0UJy?2P`$crq_07_iGvpU@H**`*&huc{t?YSS+5Q!4%3T??=f?yO04-(k MboFyt=akR{005vlQ2+n{ literal 0 HcmV?d00001 diff --git a/textures/hdf_90.png b/textures/hdf_90.png new file mode 100644 index 0000000000000000000000000000000000000000..bafc8512f0b7d31ef8d2e9f6444feba3ef99714a GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^azM<_!2%>BH*XgQQvRMUjv*T7w@y09#h}39y#2-h z`kQ@@sk0W}WjVUt@K8Wl^8&d%0fuumB^!61nfCLH&9^^i+z&t7b#ktEruU8NTYD;d lF4ZX{N<^$w*}q#?mS6LqfJp5QlMtZM44$rjF6*2UngHY4GZO#+ literal 0 HcmV?d00001 diff --git a/textures/hdf_91.png b/textures/hdf_91.png new file mode 100644 index 0000000000000000000000000000000000000000..f5d2462b6f7758782dfbdc3b61d4dd97f94fca9d GIT binary patch literal 168 zcmeAS@N?(olHy`uVBq!ia0vp^azM<_!2%>BH*XgQQu&@Pjv*T7mrnNPYf#{Ec`o^` z{%K*dz!KLf@4RmRR8@FgF6t??_51h7zqx+>6zR$CIs8zj?bnGpZ48Un{93(DMmBm6 zqs`unoHIT8oh+xNCVx6m)Kt>wn651At;Vk5xMmBtq{EpxRdU9u&y!_ttq_*Dr7W3y SCOZRYHG`+CpUXO@geCwB;y(-k literal 0 HcmV?d00001