From 4604be9a8b76589e0ac24ffaad4b8306d03edbf4 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Tue, 11 Dec 2018 11:57:54 +0100 Subject: [PATCH] Updated font_api mod desctiption in headers --- font_api/deprecation.lua | 2 +- font_api/display_api.lua | 3 +-- font_api/fallbacks.lua | 25 ++++++++++++------------- font_api/fontform.lua | 25 ++++++++++++------------- font_api/init.lua | 25 ++++++++++++------------- font_api/registry.lua | 38 ++++++++++++++++++-------------------- 6 files changed, 56 insertions(+), 62 deletions(-) diff --git a/font_api/deprecation.lua b/font_api/deprecation.lua index 5c0bed6..b764d82 100644 --- a/font_api/deprecation.lua +++ b/font_api/deprecation.lua @@ -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 This program is free software: you can redistribute it and/or modify diff --git a/font_api/display_api.lua b/font_api/display_api.lua index 2191dba..51a396d 100644 --- a/font_api/display_api.lua +++ b/font_api/display_api.lua @@ -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 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 along with this program. If not, see . --]] - -- Integration with display API if minetest.get_modpath("display_api") then diff --git a/font_api/fallbacks.lua b/font_api/fallbacks.lua index 480d865..da3ff03 100644 --- a/font_api/fallbacks.lua +++ b/font_api/fallbacks.lua @@ -1,20 +1,19 @@ --[[ - font_api mod for Minetest - Library to add font display capability - to display_api mod. - (c) Pierre-Yves Rollo + font_api mod for Minetest - Library creating textures with fonts and text + (c) Pierre-Yves Rollo - 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see . + You should have received a copy of the GNU General Public License + along with this program. If not, see . --]] -- This is the unicode char fallback map. If a char is not present in diff --git a/font_api/fontform.lua b/font_api/fontform.lua index e4952ed..b7e6724 100644 --- a/font_api/fontform.lua +++ b/font_api/fontform.lua @@ -1,20 +1,19 @@ --[[ - font_api mod for Minetest - Library to add font display capability - to display_api mod. - (c) Pierre-Yves Rollo + font_api mod for Minetest - Library creating textures with fonts and text + (c) Pierre-Yves Rollo - 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see . + You should have received a copy of the GNU General Public License + along with this program. If not, see . --]] local modname = minetest.get_current_modname() diff --git a/font_api/init.lua b/font_api/init.lua index 80fc98a..c5858f4 100644 --- a/font_api/init.lua +++ b/font_api/init.lua @@ -1,20 +1,19 @@ --[[ - font_api mod for Minetest - Library to add font display capability - to display_api mod. - (c) Pierre-Yves Rollo + font_api mod for Minetest - Library creating textures with fonts and text + (c) Pierre-Yves Rollo - 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see . + You should have received a copy of the GNU General Public License + along with this program. If not, see . --]] -- Global variables diff --git a/font_api/registry.lua b/font_api/registry.lua index 4b49b1e..e183675 100644 --- a/font_api/registry.lua +++ b/font_api/registry.lua @@ -1,20 +1,19 @@ --[[ - font_api mod for Minetest - Library to add font display capability - to display_api mod. - (c) Pierre-Yves Rollo + font_api mod for Minetest - Library creating textures with fonts and text + (c) Pierre-Yves Rollo - 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 - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program. If not, see . + You should have received a copy of the GNU General Public License + along with this program. If not, see . --]] -- Global variables @@ -124,9 +123,9 @@ end -- @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 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 --- @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. -- @key marginbottom (optional) dded at bottom of each char texture. -- @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) - if font == nil then + if font == nil then minetest.log("error", "Unable to register font \""..font_name.."\".") return end - + font.name = font_name font_api.registered_fonts[font_name] = font font_api.registered_fonts_number = font_api.registered_fonts_number + 1 - + -- Force to choose again default font -- (allows use of fonts registered after start) default_font = false - + minetest.log("action", "New font registered in font_api: "..font_name..".") end -