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.
Thank you! This was exactly what I was looking for. Very helpful.
I’m happy my article helped you 🙂
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?
I’m not sure if the copy to a Doc works. How exactly did you copy it?
Yes, the font has to be installed on the PC. To be precise, the font is your theme has to be called exactly how it’s called in your font folder (usually C:\Windows\Fonts).
Try it with special fonts like Middle Earth. Like this you will see if it works or not.
Good luck and let me know.
I had the same issue. I solved it by entering my font name with single quotes (i.e., “fontFace”:”‘Font Name'”
Thank you for sharing Justin. Yes, that’s true. I guessed it’s clear that the fonts have to be written with quotes.
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.
very good question. That would be amazing! As far as I know there is no fallback font.
When the font is not available, it will go back to the default font from my understanding.
how can i import custom external font into pwoer bi embed?
did you try with the approach mentioned above?
If I remember right Power BI embedded is using the same styles of a visual you put in the report. For that reason when you use the approach mentioned in the article, it should also work with Power BI embedded.
Let me know if that works.
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.
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.
In addition, it looks like Segoe UI Light.
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” )
the font is your theme has to be called exactly how it is called in your font folder (usually C:\Windows\Fonts).
Pay attention if it’s written in a different way like “GothamRoundedBold” or “Gotham_Rounded”. Then you have to use exactly the same name in the Theme file.
Let me know if that worked.
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?
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?
that is possible if Power BI is doing the export.
Maybe you can try to print it yourself in the browser (ctrl + p to print) and in PowerPoint use the new add-in. I think this should do it, but I didn’t test it.
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,
you can simply change the font for each element in the JSON file. Otherwise, you just have to use the fonts in the JSON file, then they will appear in the font dialogue in Power BI.
Hope that solves your issue.