cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

How to import customized fonts (Regular, Bold, Semibold, light etc.)

Hi Team,

I am trying to import customized font family to my report theme, and want to make it Bold, Medium, Regular. 

I tried to add "FontWeight":"Bold" or "Fontweight": "Regular" in JSON file, but it doesn't work in the report. 

 

Does anyone know how to add Bold font, regular font to JSON file? 

 

To be specific,

1. can we import custom font family to the Button Text font family list so that we can customize the font ? 

Screen Shot 2020-04-27 at 3.47.37 PM.png

2. How can we customize the slicer header font? I tried to customize it by modifying JSON file and add "FontWeight":"Bold". But it doesn't show as "Bold", it still show regular font. 

Screen Shot 2020-04-27 at 3.49.20 PM.png

 

Thank you,

JW.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User I
Super User I

Re: How to import customized fonts (Regular, Bold, Semibold, light etc.)

Hi @JaileneW,

My original line of thinking was that if you had a font in your system named with a heavier weight, then this would work, but upon testing further, I'm finding it very hard to find some good candidates for you. Even checking through my list of installed fonts has very mixed results.

For example, I can get Wide Latin to work, e.g.:

image.png

...and Franklin Gothic Heavy:

image.png

But for many others it seems to be a case of trial and error, which is why I generally stay with the prescribed list.

Of note, you can specify fallback fonts, by specifying another one afterwards with a comma, e.g.:

"fontFamily": "Roboto, Segoe UI"

In this case, I don't have Roboto on my system, and it will display Segoe UI instead rather than Times New Roman.

I appreciate that this doesn't really 100% solve your problem but might give you some ideas. Font support is still somewhat lacking.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Highlighted
Super User I
Super User I

Re: How to import customized fonts (Regular, Bold, Semibold, light etc.)

Hi @JaileneW,

With theming, you can only set named properties that exist in the properties pane. There are also some considerations with the properties pane UI.

In the case of the font family, the dropdown is the official supported list of fonts across Power BI, irrespective of platform (web, mobile devices etc.) and this cannot currently be added to.

As you've already observed, you can "override" the text value for font family that gets set in the background via theming, but this will only work if the user has the font installed on their system. David Eldersveld's blog post from 2018 about it is still regarded as the current way to work around this, along with the highlighted caveats.

Custom font support is still outstanding on the ideas site.

Regarding font weight, there is no property in the pane for this for core visuals, so you can't set it via theming. You can confirm what's available in the JSON file specification - note that there is no fontWeight property in the list for any components.

For this to be supported, MS would need to add such a property anywhere a complimentary font family dropdown exists in the pane and bind it into the appropiate CSS properties for any affected elements in the visual. Here's an idea for this functionality you can add your vote to. If these properties do eventually become availble, then they would be in theming also.

The only way to manage weight at present is to select a suitable font family with a bold or light weigt as part of their definition.

Not the answer you were after, I'm sure, but hopefully clarifies the current situation with fonts in Power BI.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Frequent Visitor

Re: How to import customized fonts (Regular, Bold, Semibold, light etc.)

@dm-p Thank you so much for the detailed explanation. 

I currently understand the Panel Font which is not customizable now. 

For the bold font, what do you mean by adding bold in their defintion? I tried to modify the JSON code as following, but it didn't work. It eventuall shows like Times New Roman....

Screen Shot 2020-04-27 at 9.34.56 PM.png

Highlighted
Super User I
Super User I

Re: How to import customized fonts (Regular, Bold, Semibold, light etc.)

Hi @JaileneW,

My original line of thinking was that if you had a font in your system named with a heavier weight, then this would work, but upon testing further, I'm finding it very hard to find some good candidates for you. Even checking through my list of installed fonts has very mixed results.

For example, I can get Wide Latin to work, e.g.:

image.png

...and Franklin Gothic Heavy:

image.png

But for many others it seems to be a case of trial and error, which is why I generally stay with the prescribed list.

Of note, you can specify fallback fonts, by specifying another one afterwards with a comma, e.g.:

"fontFamily": "Roboto, Segoe UI"

In this case, I don't have Roboto on my system, and it will display Segoe UI instead rather than Times New Roman.

I appreciate that this doesn't really 100% solve your problem but might give you some ideas. Font support is still somewhat lacking.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Highlighted
Frequent Visitor

Re: How to import customized fonts (Regular, Bold, Semibold, light etc.)

@dm-p Thank you so much for the expalination . It really helps me understand the font customization better. 

Helpful resources

Announcements
June 2020 Community Highlights

June 2020 Community Highlights

Featured community members, changes to the Community, and more! Read up on recent Power BI community news.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Kudoed Authors