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

Set Font to Display #21

Open
tahafathi2013 opened this issue Mar 8, 2024 · 7 comments
Open

Set Font to Display #21

tahafathi2013 opened this issue Mar 8, 2024 · 7 comments

Comments

@tahafathi2013
Copy link

tahafathi2013 commented Mar 8, 2024

I used your library and examples but the font is not my favorite.
How can I use my favorite font or at least the international English font?

IMG_20240309_004604

@CamelCaseName
Copy link
Owner

eh it's rather complicated there is no easy way
you would need to replace the method that draws the characters with your own and your own font encoding

@CamelCaseName
Copy link
Owner

but it should have all letters, no?
you can find the font I used linked in the font files

@tahafathi2013
Copy link
Author

Ok
How set or change a font on code?

@CamelCaseName
Copy link
Owner

CamelCaseName commented Mar 8, 2024

https://github.com/CamelCaseName/HUB75nano/blob/master/src/fonts/3x5font.h is where the font code is currently located

you would probably also have to adjust this here, where it actually draws the pixels to fit your pixel row and coloumn count for a letter https://github.com/CamelCaseName/HUB75nano/blob/master/src/drawing/char.h

this here is where i got it from, also has an explanation on how it works
https://hackaday.io/project/6309-vga-graphics-over-spi-and-serial-vgatonic/log/20759-a-tiny-4x6-pixel-font-that-will-fit-on-almost-any-microcontroller-license-mit#header

basically you have a row of bits and just go through each row of a letter and turn the leds on or off

@CamelCaseName
Copy link
Owner

i cant really give more info than this, i plan on making the adafruit fonts compatible sometime this year

@tahafathi2013
Copy link
Author

Please put the next update in such a way that you can define the R1 R2 G1 G2 B1 B2 pins manually, as well as the ability to determine the number of panels and the desired font whose file is attached to the project.

@CamelCaseName
Copy link
Owner

CamelCaseName commented Mar 8, 2024

R1 R2 G1 G2 B1 B2

you can already
but it is not advised as it will be way slower
rtfm: https://github.com/CamelCaseName/HUB75nano?tab=readme-ov-file#pin-mapping

You can deviate from this mapping but it comes at a speed cost. To use your own pins, refer to the table above (def. name coloumn) and just define the pin to one you like.
Example: #define RA 12 This puts the first row bit on D12 instead of A0.

as well as the ability to determine the number of panels

so far panel linking is not supported, but if you just have them in a row it works if you define the size correctly
so when you have 2 32x16 panels in a row you can set the size to 64x16 and it should work. real chaining is not programmed yet

fonts

fonts are definitely on the todo list :D

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

2 participants