refactor / cleanup font selection logic

* centralize font selection logic into  getFontInfo()
* removed unneeded parameter "numberOfChars" from drawText()
* new file: wled_fonts.hpp to centralize font management logic (inline)
* only compile wchar16ToCodepage437 when WLED_ENABLE_FULL_FONTS
* minor cleanup
This commit is contained in:
Frank
2025-11-21 17:04:08 +01:00
parent 213cd185b5
commit e6676372d8
6 changed files with 142 additions and 47 deletions

View File

@@ -1,5 +1,3 @@
#if defined(WLED_ENABLE_FULL_FONTS)
/*
@title WLED(-MM) - unicode to CP437 conversion
@repo https://github.com/MoonModules/WLED-MM, https://github.com/wled/WLED
@@ -7,6 +5,8 @@
@license Licensed under the EUPL-1.2 or later
*/
#if defined(WLED_ENABLE_FULL_FONTS)
#include "codepages.h"
#include <string.h>