This post is also available in: Deutsch
Many companies are trying to achieve a consistent appearance and have corresponding or Corporate Identity / Corporate Design (CI/CD) guidelines.
As a reporting platform, Power BI should of course be no exception and fit into the corresponding specifications. However, this is often a big question mark, because at first glance there is no option to add additional fonts in Power BI. There is only a selection of standard fonts to choose from:
One would expect the topic CI/CD in the area of themes. So I would assume that you can adjust the fonts when you configure the current theme:
But you already guessed it, even there you cannot add fonts or change them to manually installed fonts:
Is it even possible to import a font into Power BI Desktop?
For this example, let’s first choose a font that should represent our company font. I intentionally choose a font called “MiddleEarth” that allows you to see the difference in the final report:
Then of course the question comes up whether it is even possible to add a custom font in Power BI Desktop or Power BI Service. The answer is yes, this is also possible.
As an example we want to display the following report in MiddleEarth font:
User defined font via Theme File
For this we have to adjust the new font directly in the theme file we are using. If our report has a default theme, we have to export the theme file first. Important to note, Power BI only exports changes to the theme. So you should change all fonts in the theme accordingly.
So we go back to the configuration of the current theme:
In the Text options, we change the font family in all categories (General, Title, etc.), for example to “Arial”:
After that we have to save the theme as a JSON file. We do this using “Save current theme”:
We now search for this exported JSON file in Windows Explorer and open it with Notepad:
In the file we replaced all appearances of our just defined font, here “Arial”…
… with our chosen font “MiddleEarth” and save the JSON file:
In Power BI we now have to load the new design via “Browse for themes”:
We receive a message that the theme has been imported:
Afterwards the desired font appears in the report:
The font is now also available for all font options in Power BI:
Custom font on Power BI service
That Power BI can access locally installed fonts is a good start, but what about the reports on powerbi.com?
For this we simply publish the file on the Power BI service and see that the font is also visible there:
Restriction font must be installed locally
However, there is one restriction. In the Power BI file as well as on the website (Power BI Service) the user-defined font will only be displayed if it is installed locally.
If the PC has not installed the font, the font cannot be displayed. The same applies to the Power BI App.
If we look at the HTML or CSS code for the opened report on the Power BI service in the browser, we see that the value inside our JSON file is simply used as the value for the font:
This means the browser requests the font “MiddleEarth” from the file system. If the font is not found, for example because it is not installed, it cannot be displayed and a fallback font will be displayed.
For companies that for example can ensure that their custom font is installed on all computers, this is a good opportunity to integrate their own design guidelines. But as soon as you have a broader audience, where you cannot control the installed fonts, the possibilities are very fast limited.