Explain how characters work in mcl_signs
This commit is contained in:
parent
42a7baf4b4
commit
719f7b5b77
2 changed files with 17 additions and 5 deletions
|
@ -1,9 +1,12 @@
|
|||
Mod based on reworked signs mod by PilzAdam:
|
||||
https://forum.minetest.net/viewtopic.php?t=3289
|
||||
|
||||
License of code: WTFPL
|
||||
License of code and font: MIT License
|
||||
|
||||
License of textures: See README.me in top directory.
|
||||
Font source: 04.jp.org, some modifications and additions were made (added support for Latin-1 Supplement)
|
||||
Original font license text states: “YOU MAY USE THEM AS YOU LIKE” (in about.gif file distributed with the font)
|
||||
|
||||
License of textures: See README.me in top directory of MineClone 2.
|
||||
|
||||
License of models: GPLv3 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Models author: 22i.
|
||||
|
|
|
@ -1,11 +1,20 @@
|
|||
local S = minetest.get_translator("mcl_signs")
|
||||
local F = minetest.formspec_escape
|
||||
|
||||
-- Font: 04.jp.org
|
||||
-- Load the characters map (characters.txt)
|
||||
--[[ File format of characters.txt:
|
||||
It's an UTF-8 encoded text file that contains metadata for all supported characters. It contains a sequence of info blocks, one for each character. Each info block is made out of 3 lines:
|
||||
Line 1: The literal UTF-8 encoded character
|
||||
Line 2: Name of the texture file for this character minus the “.png” suffix; found in the “textures/” sub-directory
|
||||
Line 3: Currently ignored. Previously this was for the character width in pixels
|
||||
|
||||
After line 3, another info block may follow. This repeats until the end of the file.
|
||||
|
||||
All character files must be 5 or 6 pixels wide (5 pixels are preferred)
|
||||
]]
|
||||
|
||||
-- load characters map
|
||||
local chars_file = io.open(minetest.get_modpath("mcl_signs").."/characters.txt", "r")
|
||||
-- FIXME: Support more characters (many characters are missing)
|
||||
-- FIXME: Support more characters (many characters are missing). Currently ASCII and Latin-1 Supplement are supported.
|
||||
local charmap = {}
|
||||
if not chars_file then
|
||||
minetest.log("error", "[mcl_signs] : character map file not found")
|
||||
|
|
Reference in a new issue