mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2025-04-23 07:35:16 +02:00
Clean-up, remove the obsolete 04.jp.org attribution
the font is not coming from them. also, the 04.jp.org bitmap fonts are all crayon-licensed with no commercial use allowed, so it's not good to claim to source your bitmaps from them
This commit is contained in:
parent
e4e8e324ff
commit
82bf44e793
4 changed files with 31 additions and 27 deletions
mods/ITEMS/mcl_signs
|
@ -11,9 +11,6 @@
|
|||
|
||||
Code and font: MIT (see `LICENSE` file for details)
|
||||
|
||||
Font source: 04.jp.org, some modifications and additions were made (Latin-1, Latin-2 & Latin-3 support)
|
||||
Original font license text states: "YOU MAY USE THEM AS YOU LIKE" (in about.gif file distributed with the font)
|
||||
|
||||
License of models: GPLv3 (https://www.gnu.org/licenses/gpl-3.0.html)\
|
||||
Models author: 22i.\
|
||||
Source: <https://github.com/22i/amc>
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
local S, charmap = ...
|
||||
|
||||
local function table_merge(t, ...)
|
||||
local t2 = table.copy(t)
|
||||
return table.update(t2, ...)
|
||||
|
@ -36,7 +38,6 @@ local wordwrap_enabled = core.settings:get_bool("vl_signs_word_wrap", true)
|
|||
|
||||
local SIGN_GLOW_INTENSITY = 14
|
||||
|
||||
local S = core.get_translator(core.get_current_modname())
|
||||
local F = core.formspec_escape
|
||||
|
||||
-- Template definition
|
||||
|
@ -110,24 +111,6 @@ local function set_signmeta(pos, def)
|
|||
--if def.wordwrap then meta:set_string("wordwrap", def.wordwrap) end
|
||||
end
|
||||
|
||||
-- Text/texture
|
||||
local modpath = core.get_modpath(core.get_current_modname())
|
||||
local chars_file = io.open(modpath .. "/characters.txt", "r")
|
||||
-- FIXME: Support more characters (many characters are missing).
|
||||
-- Currently ASCII and Latin-1 Supplement are supported.
|
||||
assert(chars_file, "mcl_signs/characters.txt not found")
|
||||
|
||||
local charmap = {}
|
||||
while true do
|
||||
local char = chars_file:read("*l")
|
||||
if char == nil then
|
||||
break
|
||||
end
|
||||
local img = chars_file:read("*l")
|
||||
local _ = chars_file:read("*l")
|
||||
charmap[char] = img
|
||||
end
|
||||
|
||||
local function word_wrap(str)
|
||||
local nstr
|
||||
for line in str:gmatch("[^\r\n]*") do
|
||||
|
|
|
@ -1,6 +1,30 @@
|
|||
mcl_signs = {}
|
||||
|
||||
local modpath = core.get_modpath(core.get_current_modname())
|
||||
dofile(modpath .. "/api.lua")
|
||||
dofile(modpath .. "/register.lua")
|
||||
dofile(modpath .. "/compat.lua")
|
||||
local modname = core.get_current_modname()
|
||||
|
||||
local S = core.get_translator(modname)
|
||||
local modpath = core.get_modpath(modname)
|
||||
|
||||
-- Character map
|
||||
local chars_file = io.open(modpath .. "/characters.txt", "r")
|
||||
assert(chars_file, "mcl_signs/characters.txt not found")
|
||||
|
||||
local charmap = {}
|
||||
while true do
|
||||
local char = chars_file:read("*l")
|
||||
if char == nil then break end
|
||||
local img = chars_file:read("*l")
|
||||
local _ = chars_file:read("*l")
|
||||
charmap[char] = img
|
||||
end
|
||||
mcl_signs.charmap = charmap
|
||||
|
||||
local files = {
|
||||
"api",
|
||||
"register",
|
||||
"compat"
|
||||
}
|
||||
|
||||
for _, file in ipairs(files) do
|
||||
loadfile(modpath .. DIR_DELIM .. file .. ".lua")(S, charmap)
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
local S = core.get_translator(core.get_current_modname())
|
||||
local S = ...
|
||||
|
||||
local woods = {
|
||||
oak = {
|
||||
|
|
Loading…
Add table
Reference in a new issue