Added two more fonts to Scrolling text.

This commit is contained in:
Blaž Kristan 2022-08-11 11:46:30 +02:00
parent 4e0cf380be
commit 52e5f467b0
7 changed files with 13606 additions and 6161 deletions

View File

@ -5840,8 +5840,15 @@ uint16_t mode_2Dscrollingtext(void) {
const uint16_t cols = SEGMENT.virtualWidth();
const uint16_t rows = SEGMENT.virtualHeight();
const int letterWidth = SEGMENT.custom2 > 127 ? 6 : 5;
const int letterHeight = 8;
int letterWidth;
int letterHeight;
switch (map(SEGMENT.custom2, 0, 255, 1, 4)) {
default:
case 1: letterWidth = 5; letterHeight = 8; break;
case 2: letterWidth = 6; letterHeight = 8; break;
case 3: letterWidth = 7; letterHeight = 9; break;
case 4: letterWidth = 5; letterHeight = 12; break;
}
const int yoffset = map(SEGMENT.intensity, 0, 255, -rows/2, rows/2) + (rows-letterHeight)/2;
char text[33] = {'\0'};
if (SEGMENT.name) for (size_t i=0,j=0; i<strlen(SEGMENT.name); i++) if (SEGMENT.name[i]>31 && SEGMENT.name[i]<128) text[j++] = SEGMENT.name[i];

File diff suppressed because it is too large Load Diff

4099
wled00/console_font_5x12.h Normal file

File diff suppressed because it is too large Load Diff

3075
wled00/console_font_5x8.h Normal file

File diff suppressed because it is too large Load Diff

3075
wled00/console_font_6x8.h Normal file

File diff suppressed because it is too large Load Diff

3331
wled00/console_font_7x9.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
*/
// version code in format yymmddb (b = daily build)
#define VERSION 2208101
#define VERSION 2208111
//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG