From 719f7b5b779e6ebaf6287053e8be443123b85d54 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 25 Mar 2019 13:28:45 +0100 Subject: [PATCH] Explain how characters work in mcl_signs --- mods/ITEMS/mcl_signs/README.txt | 7 +++++-- mods/ITEMS/mcl_signs/init.lua | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/mods/ITEMS/mcl_signs/README.txt b/mods/ITEMS/mcl_signs/README.txt index 8950bead7..780875561 100644 --- a/mods/ITEMS/mcl_signs/README.txt +++ b/mods/ITEMS/mcl_signs/README.txt @@ -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. diff --git a/mods/ITEMS/mcl_signs/init.lua b/mods/ITEMS/mcl_signs/init.lua index 7567f9a77..133c8dc61 100644 --- a/mods/ITEMS/mcl_signs/init.lua +++ b/mods/ITEMS/mcl_signs/init.lua @@ -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")