aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Yves Rollo <dev@pyrollo.com>2018-12-11 11:57:54 +0100
committerPierre-Yves Rollo <dev@pyrollo.com>2018-12-11 11:57:54 +0100
commit51a4a45a45b057198084d5b76a33bbb368a4810f (patch)
treec53944f89f67057c39615d5737b9ecf84f605aad
parent4005b99c0583431beedb9dcdce3b1f3df9a57e1d (diff)
downloaddisplay_modpack_no_craft-51a4a45a45b057198084d5b76a33bbb368a4810f.tar.gz
display_modpack_no_craft-51a4a45a45b057198084d5b76a33bbb368a4810f.zip
Updated font_api mod desctiption in headers
-rw-r--r--deprecation.lua2
-rw-r--r--display_api.lua3
-rw-r--r--fallbacks.lua25
-rw-r--r--fontform.lua31
-rw-r--r--init.lua25
-rw-r--r--registry.lua44
6 files changed, 62 insertions, 68 deletions
diff --git a/deprecation.lua b/deprecation.lua
index 5c0bed6..b764d82 100644
--- a/deprecation.lua
+++ b/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/display_api.lua b/display_api.lua
index 2191dba..51a396d 100644
--- a/display_api.lua
+++ b/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 <http://www.gnu.org/licenses/>.
--]]
-
-- Integration with display API
if minetest.get_modpath("display_api") then
diff --git a/fallbacks.lua b/fallbacks.lua
index 480d865..da3ff03 100644
--- a/fallbacks.lua
+++ b/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 <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License
+ 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
diff --git a/fontform.lua b/fontform.lua
index e4952ed..b7e6724 100644
--- a/fontform.lua
+++ b/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
-
- 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.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
+ 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 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 <http://www.gnu.org/licenses/>.
--]]
local modname = minetest.get_current_modname()
diff --git a/init.lua b/init.lua
index 80fc98a..c5858f4 100644
--- a/init.lua
+++ b/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 <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
--]]
-- Global variables
diff --git a/registry.lua b/registry.lua
index 4b49b1e..e183675 100644
--- a/registry.lua
+++ b/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
-
- 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.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
+ 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 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 <http://www.gnu.org/licenses/>.
--]]
-- 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
-