/* # _____ ____ ___ # | \/ ____| |___| # | | | \ | | #----------------------------------------------------------------------- # Copyright 2022-2023, tyra - https://github.com/h4570/tyra # Licensed under Apache License 2.0 # Guido Diego Quispe Robles # Sandro Sobczyński */ #pragma once #include namespace Tyra{ extern const int charSize; extern const int font_char[96]; extern const int font_charWidth[96]; class Font{ public: Font(); void LoadFont(TextureRepository& repository, Renderer2D* renderer); void FreeFont(TextureRepository& repository); void DrawText(const char* text, int x, int y, Color color); void DrawText(const std::string& text, int x, int y, Color color); private: Renderer2D* renderer2D; Sprite all_font; std::array font; }; } // namespace Tyra