refactor Font
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user