refactor: unificar log de consola y centralizar fuente de UI

- Formato uniforme [Tipo] nombre (pack/disco) en texture, textrenderer, png_shape
- Eliminar logs verbosos de logo_scaler y app_logo (resolución, escalado, etc.)
- Centralizar fuente de UI en APP_FONT (defines.hpp) con las 8 opciones comentadas
- Actualizar carpeta data/fonts con nuevas fuentes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-20 23:28:32 +01:00
parent c40eb69fc1
commit 33cb995872
17 changed files with 24 additions and 24 deletions

View File

@@ -65,12 +65,6 @@ bool AppLogo::initialize(SDL_Renderer* renderer, int screen_width, int screen_he
int logo_base_target_height = static_cast<int>(base_screen_height_ * APPLOGO_HEIGHT_PERCENT);
int logo_native_target_height = static_cast<int>(native_screen_height_ * APPLOGO_HEIGHT_PERCENT);
std::cout << "Pre-escalando logos:" << std::endl;
std::cout << " Base: " << base_screen_width_ << "x" << base_screen_height_
<< " (altura logo: " << logo_base_target_height << "px)" << std::endl;
std::cout << " Nativa: " << native_screen_width_ << "x" << native_screen_height_
<< " (altura logo: " << logo_native_target_height << "px)" << std::endl;
// ========================================================================
// 3. Cargar y escalar LOGO1 (data/logo/logo.png) a 2 versiones
// ========================================================================
@@ -193,7 +187,7 @@ bool AppLogo::initialize(SDL_Renderer* renderer, int screen_width, int screen_he
logo2_current_width_ = logo2_base_width_;
logo2_current_height_ = logo2_base_height_;
std::cout << "Logos pre-escalados exitosamente (4 texturas creadas)" << std::endl;
std::cout << "[Logo] logo.png + logo2.png (base " << logo_base_target_height << "px, nativa " << logo_native_target_height << "px)\n";
return true;
}

View File

@@ -2,6 +2,7 @@
#include <algorithm> // for std::min
#include "defines.hpp"
#include "text/textrenderer.hpp"
#include "theme_manager.hpp"
@@ -101,7 +102,7 @@ void HelpOverlay::initialize(SDL_Renderer* renderer, ThemeManager* theme_mgr, in
// Crear renderer de texto con tamaño dinámico
text_renderer_ = new TextRenderer();
text_renderer_->init(renderer, "data/fonts/FunnelSans-Regular.ttf", font_size, true);
text_renderer_->init(renderer, APP_FONT, font_size, true);
calculateBoxDimensions();
}

View File

@@ -41,7 +41,6 @@ bool LogoScaler::detectNativeResolution(int& native_width, int& native_height) {
SDL_free(displays);
std::cout << "Resolución nativa detectada: " << native_width << "x" << native_height << std::endl;
return true;
}
@@ -73,8 +72,6 @@ unsigned char* LogoScaler::loadAndScale(const std::string& path,
return nullptr;
}
std::cout << "Imagen cargada: " << path << " (" << orig_width << "x" << orig_height << ")" << std::endl;
// 2. Calcular tamaño final manteniendo aspect ratio
// El alto está fijado por target_height (APPLOGO_HEIGHT_PERCENT)
// Calcular ancho proporcional al aspect ratio original
@@ -82,8 +79,6 @@ unsigned char* LogoScaler::loadAndScale(const std::string& path,
out_width = static_cast<int>(target_height * aspect_ratio);
out_height = target_height;
std::cout << " Escalando a: " << out_width << "x" << out_height << std::endl;
// 3. Alocar buffer para imagen escalada (RGBA = 4 bytes por píxel)
unsigned char* scaled_data = static_cast<unsigned char*>(malloc(out_width * out_height * 4));
if (scaled_data == nullptr) {
@@ -109,7 +104,6 @@ unsigned char* LogoScaler::loadAndScale(const std::string& path,
return nullptr;
}
std::cout << " Escalado completado correctamente" << std::endl;
return scaled_data;
}

View File

@@ -90,8 +90,8 @@ void UIManager::initialize(SDL_Renderer* renderer, ThemeManager* theme_manager,
text_renderer_notifier_ = new TextRenderer();
// Inicializar renderers con tamaño dinámico
text_renderer_debug_->init(renderer, "data/fonts/FunnelSans-Regular.ttf", std::max(9, current_font_size_ - 2), true);
text_renderer_notifier_->init(renderer, "data/fonts/FunnelSans-Regular.ttf", current_font_size_, true);
text_renderer_debug_->init(renderer, APP_FONT, std::max(9, current_font_size_ - 2), true);
text_renderer_notifier_->init(renderer, APP_FONT, current_font_size_, true);
// Crear y configurar sistema de notificaciones
notifier_ = new Notifier();