board707 / DMD_STM32

STM32Duino library for RGB, Monochrome and Two-color led matrix panels
GNU General Public License v3.0
71 stars 22 forks source link

Set Custom Font #81

Closed tahafathi2013 closed 8 months ago

tahafathi2013 commented 9 months ago

How set custom font to show text?? for example :

SystemFont5x7 Arial_black_16 Arial14

how set in code??

board707 commented 9 months ago

Using Arial14 font:

  1. Include font file to the sketch: #include "st_fonts/Arial14.h"

  2. Create Font object: DMD_Standard_Font Arial_F(Arial_14);

  3. Select font to use with text: dmd.selectFont(&Arial_F);

  4. Print the text with selected font: dmd.drawStringX(0, 15, text, color);

See the examples for more info.