2

I'm using the following config lines to set the font used by kivy globally:

Config.set('graphics', 'default_font', '["Arial", "C:/Windows/Fonts/arial.ttf", "C:/Windows/Fonts/ariali.ttf", "C:/Windows/Fonts/arialbd.ttf", "C:/Windows/Fonts/arialbi.ttf"]')
#or this 
#Config.set('graphics', 'default_font', ["Arial", "C:/Windows/Fonts/arial.ttf", "C:/Windows/Fonts/ariali.ttf", "C:/Windows/Fonts/arialbd.ttf", "C:/Windows/Fonts/arialbi.ttf"])
Config.write()

Nothing is changing. Kivy is still using it's default Roboto font. What am I missing here? Any suggestions?

Carl
  • 705
  • 8
  • 22
  • I believe that the value you are setting should be a `list` not a `string`. – John Anderson Oct 25 '18 at 14:13
  • 1
    Try using `Config.set('kivy', 'default_font', . . .`. Strangely, this works for me using Python 3.6 and Kivy 1.11, but your original code (as described in the docs) does not work for me either. – John Anderson Oct 25 '18 at 17:47

1 Answers1

4

As of kivy 1.10 default_font is now in the kivy section of Config (not mentioned in the docs). It appears that default_font still appears in the graphics section, but is ignored.

John Anderson
  • 35,991
  • 4
  • 13
  • 36