1
0
mirror of https://github.com/pyrollo/display_modpack.git synced 2024-11-14 06:10:32 +01:00

Updated font_api mod desctiption in headers

This commit is contained in:
Pierre-Yves Rollo 2018-12-11 11:57:54 +01:00
parent 523485df2b
commit 4604be9a8b
6 changed files with 56 additions and 62 deletions

View File

@ -1,5 +1,5 @@
--[[ --[[
font_api mod for Minetest - Library to create textures with fonts and text font_api mod for Minetest - Library creating textures with fonts and text
(c) Pierre-Yves Rollo (c) Pierre-Yves Rollo
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify

View File

@ -1,5 +1,5 @@
--[[ --[[
font_api mod for Minetest - Library to create textures with fonts and text font_api mod for Minetest - Library creating textures with fonts and text
(c) Pierre-Yves Rollo (c) Pierre-Yves Rollo
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
@ -15,7 +15,6 @@
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--]] --]]
-- Integration with display API -- Integration with display API
if minetest.get_modpath("display_api") then if minetest.get_modpath("display_api") then

View File

@ -1,20 +1,19 @@
--[[ --[[
font_api mod for Minetest - Library to add font display capability font_api mod for Minetest - Library creating textures with fonts and text
to display_api mod. (c) Pierre-Yves Rollo
(c) Pierre-Yves Rollo
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--]] --]]
-- This is the unicode char fallback map. If a char is not present in -- This is the unicode char fallback map. If a char is not present in

View File

@ -1,20 +1,19 @@
--[[ --[[
font_api mod for Minetest - Library to add font display capability font_api mod for Minetest - Library creating textures with fonts and text
to display_api mod. (c) Pierre-Yves Rollo
(c) Pierre-Yves Rollo
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--]] --]]
local modname = minetest.get_current_modname() local modname = minetest.get_current_modname()

View File

@ -1,20 +1,19 @@
--[[ --[[
font_api mod for Minetest - Library to add font display capability font_api mod for Minetest - Library creating textures with fonts and text
to display_api mod. (c) Pierre-Yves Rollo
(c) Pierre-Yves Rollo
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--]] --]]
-- Global variables -- Global variables

View File

@ -1,20 +1,19 @@
--[[ --[[
font_api mod for Minetest - Library to add font display capability font_api mod for Minetest - Library creating textures with fonts and text
to display_api mod. (c) Pierre-Yves Rollo
(c) Pierre-Yves Rollo
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--]] --]]
-- Global variables -- Global variables
@ -124,9 +123,9 @@ end
-- @param def font definition. A associative array with following keys : -- @param def font definition. A associative array with following keys :
-- @key default True (by default) if this font may be used as default font -- @key default True (by default) if this font may be used as default font
-- @key height (mandatory) Height in pixels of all font textures -- @key height (mandatory) Height in pixels of all font textures
-- @key widths (mandatory) Array of character widths in pixels, indexed by -- @key widths (mandatory) Array of character widths in pixels, indexed by
-- UTF codepoints -- UTF codepoints
-- @key margintop (optional) Margin (in texture pixels) added on top of each -- @key margintop (optional) Margin (in texture pixels) added on top of each
-- char texture. -- char texture.
-- @key marginbottom (optional) dded at bottom of each char texture. -- @key marginbottom (optional) dded at bottom of each char texture.
-- @key linespacing (optional) Spacing (in texture pixels) between each lines. -- @key linespacing (optional) Spacing (in texture pixels) between each lines.
@ -144,19 +143,18 @@ function font_api.register_font(font_name, font_def)
local font = font_api.Font:new(font_def) local font = font_api.Font:new(font_def)
if font == nil then if font == nil then
minetest.log("error", "Unable to register font \""..font_name.."\".") minetest.log("error", "Unable to register font \""..font_name.."\".")
return return
end end
font.name = font_name font.name = font_name
font_api.registered_fonts[font_name] = font font_api.registered_fonts[font_name] = font
font_api.registered_fonts_number = font_api.registered_fonts_number + 1 font_api.registered_fonts_number = font_api.registered_fonts_number + 1
-- Force to choose again default font -- Force to choose again default font
-- (allows use of fonts registered after start) -- (allows use of fonts registered after start)
default_font = false default_font = false
minetest.log("action", "New font registered in font_api: "..font_name..".") minetest.log("action", "New font registered in font_api: "..font_name..".")
end end