Managing fonts in the MD_MAX72xx libraries

I'm a newbie and need support. I want to change the default Font.

The Font data is stored in PROGMEM. A FONT substitution is only possible by a pointer. This pointer can be changed to point to different FONT tables.
A NULL pointer (nullptr) reset to the system default.

What did I do.

  1. My 1st test was with the example MD_MAXX72XX_PrintText --> o.k.

  2. check and settings in the MD_MAX72xx.h
    #define USE_LOCAL_FONT 1
    #define USE_INDEX_FONT 1

  3. I've created new charcaters with the Font Builder Excel-Tool: Parola MD_MAX72xx Font Builder v2.xlsm and Copy to clipboard.
    As a first Test - I create a newly charakters sets (number 0-9):

6, 126, 255, 129, 129, 255, 126, // 48 - 'Null Fett'
4, 130, 255, 255, 128, // 49 - 'Eins Fett'
6, 194, 225, 177, 153, 143, 134, // 50 - 'Zwei Fett'
6, 66, 195, 137, 137, 247, 118, // 51 - 'Drei Fett'
6, 56, 60, 38, 34, 255, 255, // 52 - 'Vier Fett'
6, 79, 207, 137, 137, 249, 113, // 53 - 'Fuenf Fett'
6, 126, 255, 137, 137, 251, 114, // 54 - 'Sechs Festt'
6, 1, 1, 241, 249, 15, 7, // 55 - 'Sieben Fett'
6, 118, 247, 137, 137, 247, 118, // 56 - 'Acht Fett'
6, 70, 207, 137, 137, 255, 126, // 57 - 'Neun Fett'

My 1st question: Where and How can I store the new FONT data?
In the MD_MAX72xx_font.cpp >> by replacing of the existing definitions?

How can I set the pointer to the new FONT.
bool setFont(fontType_t *f); ???

My 1st question: Where and How can I store the new FONT data?
In the MD_MAX72xx_font.h >> by replacing of the existing definitions?

Not the best approach. Create new fonts in the same way that that file does.

How can I set the pointer to the new FONT.
bool setFont(fontType_t *f); ???

f needs to be a pointer to the new font.

Post a link to the library you are using, of you really want help.

please find attached the links to the lib and test sketch

modified Libraby MD_MAX72XX with the new FONT: MD_MAX72xx_font_new.h

Test sketch

please find attached the links to the lib and test sketch

I hope you get help from there, then.

If you want help here, you’ll read the stickies at the top of the forum - the ones that you were supposed to read BEFORE posting here, and post your code HERE.

What I said before, I'm a newby and I have read "the Tips for getting the most out of your post"

Ouote: "If you are using a library that does not come with the IDE (in other words, you downloaded it from somewhere please post a link to this library."

I've modified the library and test sketch and published the link.

... on the other hand,

  • it is not allowed "a post of hundreds of lines of code"

Your request was:

PaulS:
Post a link to the library you are using, of you really want help.

But thank you for your answer.

Regardless of how I've changed the MD_MAX72xx library I ask two simple questions.

The following bypass works fine.

  1. In the MD_MAX72xx_font.cpp >> replacing of the existing FONT definitions.
  2. In this case, it is not required to set the point to the new FONT.

happy easter

You don't need to modify the library files, although that will work. The example Parola_Fonts (the hint is in the name) shows how to change fonts on the fly.