yes, i was able to recreate the ultra narrow font.
the fonts.h file (first one is for numbers)
#include <Arduino.h>
uint8_t NUMB_2x5[11][6] = {
{0b11,0b11,0b11,0b11,0b11,0b00}, // 0
{0b01,0b11,0b01,0b01,0b01,0b00}, // 1
{0b11,0b01,0b11,0b10,0b11,0b00}, // 2
{0b11,0b01,0b11,0b01,0b11,0b00}, // 3
{0b10,0b10,0b11,0b01,0b01,0b00}, // 4
{0b11,0b10,0b11,0b01,0b11,0b00}, // 5
{0b11,0b10,0b11,0b11,0b11,0b00}, // 6
{0b11,0b01,0b01,0b01,0b01,0b00}, // 7
{0b11,0b11,0b00,0b11,0b11,0b00}, // 8
{0b11,0b11,0b11,0b01,0b11,0b00}, // 9
{0b00,0b00,0b00,0b00,0b00,0b00} //
};
uint8_t FONT_5x7[27][8] = {
{0b01110,0b10001,0b10001,0b11111,0b10001,0b10001,0b10001,0b00000}, // A
{0b11110,0b10001,0b10001,0b11110,0b10001,0b10001,0b11110,0b00000}, // B
{0b01110,0b10001,0b10000,0b10000,0b10000,0b10001,0b01110,0b00000}, // C
{0b11110,0b10001,0b10001,0b10001,0b10001,0b10001,0b11110,0b00000}, // D
{0b11111,0b10000,0b10000,0b11110,0b10000,0b10000,0b11111,0b00000}, // E
{0b11111,0b10000,0b10000,0b11110,0b10000,0b10000,0b10000,0b00000}, // F
{0b01110,0b10001,0b10000,0b10111,0b10001,0b10001,0b01110,0b00000}, // G
{0b10001,0b10001,0b10001,0b11111,0b10001,0b10001,0b10001,0b00000}, // H
{0b01110,0b00100,0b00100,0b00100,0b00100,0b00100,0b01110,0b00000}, // I
{0b00111,0b00010,0b00010,0b00010,0b10010,0b10010,0b01100,0b00000}, // J
{0b10001,0b10010,0b10100,0b11000,0b10100,0b10010,0b10001,0b00000}, // K
{0b10000,0b10000,0b10000,0b10000,0b10000,0b10000,0b11111,0b00000}, // L
{0b10001,0b11011,0b10101,0b10101,0b10001,0b10001,0b10001,0b00000}, // M
{0b10001,0b11001,0b10101,0b10011,0b10001,0b10001,0b10001,0b00000}, // N
{0b01110,0b10001,0b10001,0b10001,0b10001,0b10001,0b01110,0b00000}, // O
{0b11110,0b10001,0b10001,0b11110,0b10000,0b10000,0b10000,0b00000}, // P
{0b01110,0b10001,0b10001,0b10001,0b10101,0b10010,0b01101,0b00000}, // Q
{0b11110,0b10001,0b10001,0b11110,0b10100,0b10010,0b10001,0b00000}, // R
{0b01111,0b10000,0b10000,0b01110,0b00001,0b00001,0b11110,0b00000}, // S
{0b11111,0b00100,0b00100,0b00100,0b00100,0b00100,0b00100,0b00000}, // T
{0b10001,0b10001,0b10001,0b10001,0b10001,0b10001,0b01110,0b00000}, // U
{0b10001,0b10001,0b10001,0b10001,0b10001,0b01010,0b00100,0b00000}, // V
{0b10001,0b10001,0b10001,0b10101,0b10101,0b11011,0b10001,0b00000}, // W
{0b10001,0b10001,0b01010,0b00100,0b01010,0b10001,0b10001,0b00000}, // X
{0b10001,0b10001,0b01010,0b00100,0b00100,0b00100,0b00100,0b00000}, // Y
{0b11111,0b00001,0b00010,0b00100,0b01000,0b10000,0b11111,0b00000}, // Z
{0b00000,0b00000,0b00000,0b00000,0b00000,0b00000,0b00000,0b00000} //
};
and the program - just showing seconds and hundredths from millis
#include <Arduino_LED_Matrix.h>
#include "fonts.h"
Arduino_LED_Matrix matrix;
const uint8_t ROWS = 8;
const uint8_t COLS = 13;
void setup() {
matrix.begin();
clear();
}
void loop() {
Time();
}
// Build columns for text: returns allocated array (caller free)
uint8_t* buildColumnsForText(String text, int &outCols) {
int len = sizeof(text);
outCols = len * 3;
uint8_t *cols = (uint8_t*) malloc(outCols);
if (!cols) { outCols = 0; return nullptr; }
int idx = 0;
for (int i=0;i<len;i++) {
char ch = text[i];
if (ch >= 'a' && ch <= 'z') ch = ch - 'a' + 'A';
int fi = 26;
if (ch >= 'A' && ch <= 'Z') fi = ch - 'A';
for (int col=0; col<5; col++) {
uint8_t columnByte = 0;
for (int r=0; r<8; r++) {
uint8_t rowBits = FONT_5x7[fi][r] & 0x1F;
uint8_t bit = (rowBits >> (4 - col)) & 1;
columnByte |= (bit << r);
}
cols[idx++] = columnByte;
}
cols[idx++] = 0x00;
}
outCols = idx;
return cols;
}
// Build columns for number: returns allocated array (caller free)
uint8_t* buildColumnsForNumb(String text, int &outCols) {
int len = sizeof(text);
outCols = len * 3;
uint8_t *cols = (uint8_t*) malloc(outCols);
if (!cols) { outCols = 0; return nullptr; }
int idx = 0;
for (int i=0;i<len;i++) {
char ch = text[i];
int fi = 10;
if (ch >= '0' && ch <= '9') fi = ch - '0';
byte mi;
if (i==2) mi = 1; else mi = 0;
for (int col=mi; col<2; col++) {
uint8_t columnByte = 0;
for (int r=0; r<6; r++) {
uint8_t rowBits = NUMB_2x5[fi][r] & 0x1F;
uint8_t bit = (rowBits >> (1 - col)) & 1;
columnByte |= (bit << r);
}
cols[idx++] = columnByte;
}
cols[idx++] = 0x00;
}
outCols = idx;
return cols;
}
void drawFrameFromColumnsAs8bit(uint8_t *columns, int totalCols, int offset) {
uint8_t frame[ROWS * COLS];
for (int r=0; r<ROWS; r++) {
for (int c=0; c<COLS; c++) {
int colIndex = offset + c;
uint8_t outVal = 0;
if (columns && colIndex >= 0 && colIndex < totalCols) {
uint8_t bit = (columns[colIndex] >> r) & 1;
outVal = bit ? 255 : 0;
} else {
outVal = 0;
}
frame[r * COLS + c] = outVal;
}
}
matrix.draw(frame);
}
void Text(String text, byte offset) {
int totalCols = 0;
uint8_t *cols = buildColumnsForNumb(text, totalCols);
if (!cols || totalCols == 0) { if (cols) free(cols); return; }
matrix.setGrayscaleBits(8);
drawFrameFromColumnsAs8bit(cols, totalCols, offset);
free(cols);
}
void clear() {
matrix.setGrayscaleBits(8);
uint8_t blank[ROWS * COLS];
memset(blank, 0, sizeof(blank));
matrix.draw(blank);
}
void Time() {
byte SPACE[]={0b00,0b01,0b00,0b01,0b00,0b00};
for (int i=0; i<sizeof(SPACE)/sizeof(SPACE[0]); i++) NUMB_2x5[10][i]=SPACE[i];
if((millis()/10000%100) <10 && (millis()/ 100%100) <10)
Text("0"+String(millis()/10000%100)+" "+"0"+String(millis()/100%100),0); else
if((millis()/10000%100)>=10 && (millis()/ 100%100) <10)
Text(""+String(millis()/10000%100)+" "+"0"+String(millis()/100%100),0); else
if((millis()/10000%100) <10 && (millis()/ 100%100)>=10)
Text("0"+String(millis()/10000%100)+" "+""+String(millis()/100%100),0); else
if((millis()/10000%100)>=10 && (millis()/ 100%100)>=10)
Text(""+String(millis()/10000%100)+" "+""+String(millis()/100%100),0);
delay(62);
clear();
}
works well.