mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
refactor Font
This commit is contained in:
parent
a17314d5e0
commit
79693580e0
3 changed files with 15 additions and 37 deletions
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue