mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
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
22 lines
441 B
C++
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_ */
|