// text_renderer.hpp - Renderitzador de text amb formes .shp // © 2025 Port a C++20 amb SDL3 #pragma once #include #include "../core/types.hpp" // Forward declarations struct SDL_Renderer; namespace Graphics { class Shape; } namespace Utils { class TextRenderer { public: // Renderitza un string en la posició especificada static void render(SDL_Renderer* renderer, const std::string& text, int x, int y, int spacing = 22); // Calcula el ancho total de un string static int calculate_width(const std::string& text, int spacing = 22); private: // Mapea un caràcter a su nombre de archivo .shp static std::string get_char_filename(char c); }; } // namespace Utils