voxelcore/src/graphics/Font.h
MihailRis bdd3fbf7d4
Added 3 unicode pages for font, fixed UI, added Block.breakable
Added 1, 2, 3 and 4 unicode pages from Minecraft.
Font now uses std::wstring instead of std::string
Added Block.breakable field (the only unbreakable block is bedrock)
Bedrock is now selectable
2022-07-14 19:23:31 +03:00

22 lines
441 B
C++

#ifndef GRAPHICS_FONT_H_
#define GRAPHICS_FONT_H_
#include <string>
#include <vector>
class Texture;
class Batch2D;
class Font {
public:
std::vector<Texture*> pages;
Font(std::vector<Texture*> pages);
~Font();
int getGlyphWidth(char c);
bool isPrintableChar(int c);
void draw(Batch2D* batch, std::wstring text, int x, int y);
void drawWithShadow(Batch2D* batch, std::wstring text, int x, int y);
};
#endif /* GRAPHICS_FONT_H_ */