Stashing fonts, start font registry.

This commit is contained in:
2025-12-02 17:18:43 -08:00
parent 49fa7ff8a7
commit 09e4cd7ec6
34 changed files with 111742 additions and 28834 deletions

33
fonts/Font.h Normal file
View File

@@ -0,0 +1,33 @@
#pragma once
#include <string>
#include <utility>
#include "BrassMonoCode.h"
namespace kte::Fonts {
static const unsigned int DefaultFontSize = DefaultFontBoldCompressedSize;
static const unsigned int *DefaultFontData = DefaultFontBoldCompressedData;
}
class Font {
public:
Font(std::string name, unsigned int *data, const unsigned int size)
: name_(std::move(name)),
data_(data),
size_(size) {}
std::string Name()
{
return name_;
}
void Load(float size) const;
private:
std::string name_;
unsigned int *data_{nullptr};
unsigned int size_{0};
};