Cleanup font generators

This commit is contained in:
Georg Hagen
2025-03-02 18:58:33 +01:00
parent ee82919293
commit 6c796bb3a0
6 changed files with 24 additions and 61 deletions

View File

@@ -34,7 +34,6 @@ namespace OpenVulkano
using namespace Math;
namespace fs = std::filesystem;
constexpr int CREATE_BITMAP_ATLAS = 0;
//#define CREATE_NEW_ATLAS
class TextExampleAppImpl final : public TextExampleApp
@@ -67,12 +66,6 @@ namespace OpenVulkano
m_nodesPool.resize(textsCount * atlasesCount);
m_drawablesPool.resize(textsCount * atlasesCount);
if constexpr (CREATE_BITMAP_ATLAS)
{
// ReSharper disable once CppDFAUnreachableCode
FontAtlasFactory().GetFontAtlas("Roboto-Regular", 14.0f, SubpixelLayout::RGB)->Save("bitmap_atlas_rgb.ovfont");
}
#if defined(MSDFGEN_AVAILABLE) && defined(CREATE_NEW_ATLAS)
std::set<uint32_t> s = SdfFontAtlasGenerator::LoadAllGlyphs(fontPath);
m_atlasGenerator.GenerateAtlas(fontPath, s);