mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
34 lines
665 B
C++
34 lines
665 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class Font;
|
|
struct Glyph;
|
|
|
|
class Texture;
|
|
|
|
namespace vector_fonts {
|
|
class FontFile {
|
|
public:
|
|
virtual ~FontFile() {}
|
|
|
|
virtual std::unique_ptr<Font> createInstance(int size) = 0;
|
|
|
|
virtual std::unique_ptr<Texture> renderPage(
|
|
int pageid, std::vector<Glyph>& glyphs, int size
|
|
) = 0;
|
|
|
|
bool isMonospace() const {
|
|
return monospace;
|
|
}
|
|
protected:
|
|
bool monospace = true;
|
|
};
|
|
|
|
void initialize();
|
|
void finalize();
|
|
|
|
std::shared_ptr<vector_fonts::FontFile> load_font(const std::string& filename);
|
|
}
|