Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Change Fonts? #5

Open
jay6621 opened this issue Nov 10, 2016 · 6 comments
Open

How to Change Fonts? #5

jay6621 opened this issue Nov 10, 2016 · 6 comments

Comments

@jay6621
Copy link

jay6621 commented Nov 10, 2016

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
Copy link
Author

jay6621 commented Dec 26, 2016

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

@avk013
Copy link

avk013 commented Dec 26, 2016

@jay6621
Copy link
Author

jay6621 commented Dec 27, 2016

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..

@AHorneffer
Copy link

@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.

@joveaaron
Copy link

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.

@bobosch
Copy link

bobosch commented May 1, 2023

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);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants