26 lines
949 B
C++
26 lines
949 B
C++
/*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "FontAtlasGeneratorBase.hpp"
|
|
|
|
namespace OpenVulkano::Scene
|
|
{
|
|
|
|
class BitmapFontAtlasGenerator : public FontAtlasGeneratorBase
|
|
{
|
|
public:
|
|
BitmapFontAtlasGenerator() : FontAtlasGeneratorBase(1) {}
|
|
void GenerateAtlas(const std::string& fontFile, const std::set<uint32_t>& charset,
|
|
const std::optional<std::string>& pngOutput = std::nullopt) override;
|
|
void GenerateAtlas(const Array<char>& fontData, const std::set<uint32_t>& charset,
|
|
const std::optional<std::string>& pngOutput = std::nullopt) override;
|
|
private:
|
|
void Generate(const std::variant<std::string, Array<char>>& source, const std::set<uint32_t>& chset, const std::optional<std::string>& pngOutput);
|
|
};
|
|
}
|