board707 / DMD_STM32

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

Set Custom Font #81

Closed tahafathi2013 closed 3 months ago

tahafathi2013 commented 4 months ago

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

SystemFont5x7 Arial_black_16 Arial14

how set in code??

board707 commented 4 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.