refactor Font

This commit is contained in:
MihailRis
2024-11-11 20:30:10 +03:00
parent a17314d5e0
commit 79693580e0
3 changed files with 15 additions and 37 deletions
+4 -4
View File
@@ -17,8 +17,9 @@ enum class FontStyle {
class Font {
int lineHeight;
int yoffset;
public:
int glyphInterval = 8;
std::vector<std::unique_ptr<Texture>> pages;
public:
Font(std::vector<std::unique_ptr<Texture>> pages, int lineHeight, int yoffset);
~Font();
@@ -41,7 +42,6 @@ public:
/// @brief Check if character is visible (non-whitespace)
/// @param codepoint character unicode codepoint
bool isPrintableChar(uint codepoint) const;
void draw(Batch2D* batch, std::wstring text, int x, int y);
void draw(Batch2D* batch, const std::wstring& text, int x, int y, FontStyle style);
void draw(Batch2D* batch, std::wstring_view text, int x, int y, FontStyle style);
void draw(Batch2D* batch, std::wstring_view text, int x, int y);
};