Files
Jan LaupetinandGitHub 0874f0c36f 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
2026-07-08 23:35:58 +02:00

43 lines
736 B
Lua

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