mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-07-19 14:30:37 +00:00
feat: font generation from ttf (#882)
* chore: add file variant of json fonts * chore: add stb dependency * feat: generate fonts from ttf files * chore: add option to add yOffset to file font * chore: dynamically adjust generated font bitmap size * fix: printable characters should respect ISO-8859-1 control characters * chore: do not write missing glyphs into the bitmap * chore: remove test texture conversion * chore: adjust font compiler for iw3,iw4,iw5,t4,t5 * chore: add possibility to fill color channels when converting * fix: games other than t6 use rgba for fonts * fix: make sure no mipmaps are set on loaddef * fix: t4 and iw3 use dimensions in image loaddef * chore: also include optional glyphs in fonts
This commit is contained in:
+1
Submodule thirdparty/stb added at 31c1ad3745
Vendored
+42
@@ -0,0 +1,42 @@
|
||||
stb = {}
|
||||
|
||||
function stb:include(includes)
|
||||
if includes:handle(self:name()) then
|
||||
includedirs {
|
||||
path.join(ThirdPartyFolder(), "stb")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
function stb:link(links)
|
||||
links:add(self:name())
|
||||
end
|
||||
|
||||
function stb:use()
|
||||
|
||||
end
|
||||
|
||||
function stb:name()
|
||||
return "stb"
|
||||
end
|
||||
|
||||
function stb:project()
|
||||
local folder = ThirdPartyFolder()
|
||||
local includes = Includes:create()
|
||||
|
||||
project(self:name())
|
||||
targetdir(TargetDirectoryLib)
|
||||
location "%{wks.location}/thirdparty/%{prj.name}"
|
||||
kind "StaticLib"
|
||||
language "C++"
|
||||
|
||||
files {
|
||||
path.join(folder, "stb/*.h"),
|
||||
path.join(folder, "stb_impl/*.cpp")
|
||||
}
|
||||
|
||||
self:include(includes)
|
||||
|
||||
-- Disable warnings. They do not have any value to us since it is not our code.
|
||||
warnings "off"
|
||||
end
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
#define STB_TRUETYPE_IMPLEMENTATION
|
||||
#include "stb_truetype.h"
|
||||
Reference in New Issue
Block a user