Module:LatinRunes
Jump to navigation
Jump to search
| Module Documentation [edit] | ||||||
|---|---|---|---|---|---|---|
|
A module for displaying Latin Witch Runes. For using other runic typefaces, see Template:Runes. Functions
Usage examples{{#invoke:LatinRunes|svg|MAGIA RECORD}}
{{#invoke:LatinRunes|svg|Deny the obvious, uphold the inane...?|x40px}}
{{#invoke:LatinRunes|svg|Deny the obvious, uphold the inane...?|x40px|4em}}
|
-- temporary solution until i figure out how to utilize SDF fonts properly and make a normal font
local _ = {}
_.svg = function(frame)
-- t - text
local t = frame.args[1]
-- s - size of SVGs
local s = frame.args[2]
-- st - size of non-SVG plaintext
local st = frame.args[3]
-- r - result
local r = ""
if s == nil or s == "" then
s = "x10px"
end
for v in t:gmatch"." do
if string.match(v,"[a-zA-Z]") then
r = r .. "[[File:Latin " .. string.upper(v) .. ".svg|" .. s .. "|class=invert-dark|alt=" .. string.upper(v) .. "]]"
else
r = r .. v
end
end
if st ~= nil and st ~= "" then
r = "<span style=\"font-size:" .. st .. "\">" .. r .. "</span>"
end
return r
end
return _