Skip to content

Working with Fonts

You can specify which font you want to use as a property of any of the widgets that contain text. You can use system-wide fonts that are installed on the computer running MPF as well as fonts that are in your machine's /fonts folder.

You specify fonts by name only (not including the extension), and MPF will first look in your machine's fonts folder, and if it doesn't find the font there, it will look in the MPF-MC's built-in fonts folder, and finally in your machine's system fonts location.

Note

The MPC MC contains a few pixel-based for use on DMDs. See bitmap_fonts for details.

For consistency of appearance across computers, we highly recommend that you put the fonts you want to use in your machine's fonts folder.

Specifying which font a particular widget uses is done via that widget's font_name: setting, so see either the bitmap_fonts or bitmap_fonts reference for details.

Keep in mind that all widget properties, including fonts, can be configured as part of a widget style and easily applied to new widgets with a single line.

MPF also supports Bitmap Fonts if you want to create your own fonts for your machine.

How to Set Fonts and Sizes Globally?

You usually want to use three to five different font + size combinations in your machine. However, you often want to adjust them later on without touching all your slides and widgets. For that reason it makes sense to define a widget_style for all your fonts and sizes:

widget_styles:
  text_small:
    font_size: 15
    color: red
  text_default:
    font_size: 21
    color: blue

You can then use style: text_default in your text widgets. See widget_style for details.


Something missing or wrong? You can fix it!

This website is edited by people like you! Is something wrong or missing? Is something out of date, or can you explain it better?

Please help us! You can fix it yourself and be an official "open source" contributor!

It's easy! See our Beginner's guide to editing the docs.

Page navigation via the keyboard: < >

You can navigate this site via the keyboard. There are two modes:

General navigation, when search is not focused:

  • F , S , / : open search dialog
  • P , , : go to previous page
  • N , . : go to next page

While using the search function:

  • Down , Up : select next / previous result
  • Esc , Tab : close search
  • Enter : go to highlighted page in the results