arduino-Max72xxPanel icon indicating copy to clipboard operation
arduino-Max72xxPanel copied to clipboard

How to Change Fonts?

Open jay6621 opened this issue 8 years ago • 6 comments

Thank you so much for this lovely library. What if I want to use other font ? I included font file from font folder, then I have tried calling matrix.setfont(address of font), but it didn't displayed correctly(no characters at all), when passed NULL value in setfont then it works perfectly. Please Reply.

jay6621 avatar Nov 10 '16 10:11 jay6621

Hello Guys.. Please Reply.. I need Help..

jay6621 avatar Dec 26 '16 15:12 jay6621

Hard core - Example user font http://tronixstuff.com/2013/10/11/tutorial-arduino-max7219-led-display-driver-ic/ but I reccomend https://learn.adafruit.com/adafruit-gfx-graphics-library/using-fonts

avk013 avatar Dec 26 '16 18:12 avk013

Thanks avk013 , First Link you suggested is working fine but it is using LedControl library, Second which you recommended,( I too preferring that ) is not working or I am doing wrong. What I did is set font using setFont(); function but it did not displayed correctly.. I would be happy to work on this code. Please Suggest some way to work on..

jay6621 avatar Dec 27 '16 05:12 jay6621

@jay6621 For my the setFont() works. But the reference "baseline" for the default font and the font libraries seems to be different: the reference for the default font seems to be the top of the font, and for the others it seems to be the bottom line.

AHorneffer avatar Oct 22 '17 17:10 AHorneffer

I am having the same issue. I have created my own font too, but I am having trouble trying to figure out the syntax of SetFont();. I have looked at the documentation but I can't seem to figure out what do some things mean. The built-in MD_Parola example is very confusing because of the way it's coded. If someone has figured out an easy solution to this, or has this little piece of code in it's project somewhere that is giving us so many headaches, please, share it. Regards, Aaron.

joveaaron avatar Nov 13 '21 21:11 joveaaron

Use https://pjrp.github.io/MDParolaFontEditor

#include <MD_MAX72xx.h>
#include <MD_Parola.h>

MD_MAX72XX::fontType_t newFont[] PROGMEM = 
{
...
};

(don't forget the ";" at the end)

void setup() {
  P.begin();
  P.setFont(newFont);
}

bobosch avatar May 01 '23 20:05 bobosch