WhatTheFact_Logo_Transparent_353x76px

Using enterprise or custom fonts in Power BI

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:

Standard Fonts in Power BI
Standard Fonts in Power BI

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:

Customize theme in Power BI
Customize theme in Power BI

But you already guessed it, even there you cannot add fonts or change them to manually installed fonts:

Overview Fonts in Power BI
Overview Fonts in Power BI

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:

Font "MiddleEarth"
Font “MiddleEarth”

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:

Report to be customized with a user-defined font
Report to be customized with a user-defined 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:

Customize theme in Power BI
Customize theme in Power BI

In the Text options, we change the font family in all categories (General, Title, etc.), for example to “Arial”:

Change the theme font in Power BI to Arial
Change the theme font to Arial

After that we have to save the theme as a JSON file. We do this using “Save current theme”:

Save current design
Save current design

We now search for this exported JSON file in Windows Explorer and open it with Notepad:

Exported theme JSON file
Exported theme JSON file

In the file we replaced all appearances of our just defined font, here “Arial”…

The existing font in the theme JSON file
The existing font in the theme JSON file

… with our chosen font “MiddleEarth” and save the JSON file:

The changed font in the theme JSON file
The changed font in the theme JSON file

In Power BI we now have to load the new design via “Browse for themes”:

Loading a theme file
Loading a theme file

We receive a message that the theme has been imported:

Theme was imported
Theme was imported

Afterwards the desired font appears in the report:

Power BI Report with changed font
Power BI Report with changed font

The font is now also available for all font options in Power BI:

Custom font is now available in Power BI
Custom font is now available 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:

Custom font also works in browser on Power BI service
Custom font also works in browser on Power BI service

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:

Custom font is also addressed in the CSS file of Power BI
Custom font is also addressed in the CSS file of Power BI

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.

Conclusion

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.

Share:

LinkedIn
Twitter
WhatsApp
Telegram
Email
Print
Denis Selimovic

Denis Selimovic

As a user from the very beginning, Denis Selimovic is passionate about Power BI and everything related to it. In his blog WhatTheFact.bi, he writes about the latest developments in Power BI and provides tips and tricks on the subject. Besides being a Power BI enthusiast, blog author, speaker and principal consultant, he is also co-organizer of the Meetup Power BI User Group Switzerland.

Kommentare:

5 9 votes
Article Rating
Subscribe
Notify of
guest
20 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Aaron
Aaron
1 year ago

Thank you! This was exactly what I was looking for. Very helpful.

David Lee
1 year ago

Denis, I followed the steps to add in my own company’s font called “National 2” but when I copy the font from Power BI Desktop to a Word document, it says it is Segoe UI Light. You mentioned something about installing the font on my PC. Is this what I am missing as that font is loaded into my Word document?

Justin Pawlak
Justin Pawlak
2 months ago

I had the same issue. I solved it by entering my font name with single quotes (i.e., “fontFace”:”‘Font Name'”

Ryan
Ryan
1 year ago

Hello! Odd question: If the PC viewing my report does not have my selected font installed, do you know of a way to set the “fallback” font? I’d rather have it show as Segoe UI than Arial, for example.

David Sanchez
David Sanchez
1 year ago

How
how can i import custom external font into pwoer bi embed?

David Lee
1 year ago

Denis, Just saw your response. I will get back after I have checked it. My IS Service people loaded the font but called it National2 instead of National 2.

David Lee
1 year ago

Denis,

On loading National 2, it looks like this. The attachment is the actual National 2 where you can see that the “l” has a curve at the bottom end.

National 2

Thanks.

National 2.JPG
David Lee
1 year ago
Reply to  David Lee

In addition, it looks like Segoe UI Light.

Nicolas.
Nicolas.
1 year ago

Hi Denis.
Exactly the procedure I was looking for to integrate my company’s font to powerBi.
Unfortulatly, it does not work. Font is well installed on my computer (I see it in charmap and I can use it with MS Word) but I can’ display it in PowerBI…
Have you an idea of what can be wrong ?
(the font I try to use is “Gotham Rounded Bold” )

David Lee
1 year ago

Denis,
The name I used is exactly the same as that in C:\Windows\Fonts. Somehow my National 2 looks exactly like Segoe UI Light. I tried other fonts and they work fine. Any idea?

Elvir Mujkić
Elvir Mujkić
6 months ago

I tried your idea and it works fine. It shows font when you check report on service.
However when I try exporting to PDF or PPT it falls back to default font. Do you have ideas how could we make it do export in the same font?

Rukesh
Rukesh
5 months ago

Hi Denis,

I’ve three fonts, Archer as Main Header and Arial as sub header and Georgia as text,
in these case how to add all three font in to power Bi,

Please suggest

Regards,
Rukesh

Last edited 5 months ago by Rukesh
20
0
Would love your thoughts, please comment.x
()
x