Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
TerYeah
Helper I
Helper I

Fontfamily DIN doesn't work in theme json

I've seen a couple of post regarding problems with certain fontfamilies in json themes (e.g. Segoe (Bold)): https://community.powerbi.com/t5/Desktop/Theming-Usage-of-the-quot-Segoe-Bold-quot-font/td-p/496531

I seem to have the exact same problem with the DIN font. The json file loads as it should, and the format box even says Font family: "DIN", but the numbers are actually showing up in Times New Roman. I'm using this for labels in column and bar charts. 

 

Any hints on how to fix this? I really don't think there are any good alternatives to DIN when it comes to data labels.

1 ACCEPTED SOLUTION
datanerd21
Regular Visitor

Hmm, wasn't sure if my reply got posted or not so I'll try again...

 

@TerYeah  
I had the exact same issue and it was driving me bonker! No Googling helped so I manually changed a bunch of the text options in the 'Customize current theme' section and then after making the changes I saved the theme directly out of Power BI and then had to sift through the file using VS Code. Of course it exports it all in a single line of code to drag this process out. Eventually I found what you posted:

 

{"fontFace":"wf_standard-font, helvetica, arial, sans-serif"}

 

In this case just use "wf_standard-font" to set it to DIN. Another way would be to just not declare a fontfamily when the default Power BI theme uses DIN (for example with the Card visualization) but I'm assuming you're doing it somewhere that DIN is not the default.

 

Anyway, hope that helps...even if it was many months ago you asked.

View solution in original post

11 REPLIES 11
Nicklas_schmidt
Frequent Visitor

This: 

"fontFamily": "'DIN', wf_standard-font, helvetica, arial, sans-serif"
datanerd21
Regular Visitor

Hmm, wasn't sure if my reply got posted or not so I'll try again...

 

@TerYeah  
I had the exact same issue and it was driving me bonker! No Googling helped so I manually changed a bunch of the text options in the 'Customize current theme' section and then after making the changes I saved the theme directly out of Power BI and then had to sift through the file using VS Code. Of course it exports it all in a single line of code to drag this process out. Eventually I found what you posted:

 

{"fontFace":"wf_standard-font, helvetica, arial, sans-serif"}

 

In this case just use "wf_standard-font" to set it to DIN. Another way would be to just not declare a fontfamily when the default Power BI theme uses DIN (for example with the Card visualization) but I'm assuming you're doing it somewhere that DIN is not the default.

 

Anyway, hope that helps...even if it was many months ago you asked.

Well that seems to work, thank you very much! Better late than ever, eh? 😀

 

The only minor catch with this method, is that the value in the format section is actually showing as wf_standard-font" and not "DIN", but I can totally live with that. Thanks again!

wf_standard-font.jpg

This worked for me! Many thanks.

v-yingjl
Community Support
Community Support

Hi @TerYeah ,

About Fontfamily in json, you can refer this simliar issue:

  1. theme json for visuals (fontfamily)  
  2. Change fontfamily power bi report 

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Thanks, @v-yingjl, the first one of these addresses the same problem that I have (even mentions that it happens to Font family DIN, as well). So what I need is a syntax similar to this, only for DIN.

 

{"fontFace":"'Segoe UI Bold', wf_segoe-ui_bold, helvetica, arial, sans-serif"}

 

Anonymous
Not applicable

@TerYeah Did you ever find the answer to this mystery?

@Anonymous 

No, I still can't get this to work! Had to change the theme file to use a different (and not so good) label font. 

harshnathani
Community Champion
Community Champion

Hi @TerYeah ,

 

 

Watch this video. Explains how can you change title size, color, font and backgrounds with the JSON theme file

 

https://www.youtube.com/watch?v=l3389KbpEtA

 

https://www.youtube.com/watch?v=94vwI66Gb9Q

 

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Thanks, but I obviously already know how to edit and import a json theme file, that's how I got here in the first place.

The problem is that this specific font family that I'm using won't work. 

Someone posted a workaround for the same issue with a different font family, I'm wondering if there is a similar solution to this!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.