Add non default characters to the LV_FONT_MONTSERRAT_22 font

What do you want to achieve?

I want to add the fraction characters ½ ¼ ¾ to the built in LV_FONT_MONTSERRAT_22 font.

What have you tried so far?

I read a similar question on the LVGL forum which said you need to create your own font, but this doesn’t really add to the built in font.

I created my own montserrat 22 in SquareLine with the extended ASCII set and it didn’t show these characters. I then created a montserrat 23 in SquareLine and it does show them. So I don’t know how to replace/override the built in montserrat 22.

I built a “montserrat extended 22” in SquareLine which gives me the desired outcome, but I now believe I am loading two copies of the same font. I had compile failures if I changed the lv_conf.h value:


Screenshot or video


  • SquareLine Studio version:
  • Operating system:
  • Target hardware:

If you’d like to override the original lv_font_montserrat_22.c file it can be found in lvgl/src/font a modification that’s outside of the reach of SquareLine studio. But it’s better if you create and set a new font in SquareLine Studio and leave LV_FONT_MONTSERRAT_22 at value 0, so the original font won’t get built as an unnecessary duplicate taking memory. (So the preferred way is that you follow in your other opened topic: UI won't load widgets past one with a custom font )