cancel
Showing results for 
Search instead for 
Did you mean: 
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

10 REPLIES 10
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. 

amitchandak
Super User
Super User

@TerYeah , for Themes refer
https://docs.microsoft.com/en-us/power-bi/desktop-report-themes
https://www.wallstreetmojo.com/power-bi-themes/



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s || 50+Power Query List Functions : Learn Power Query List
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!
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
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show Episode 10 Recap

The Power BI Community Show

Watch the playback when Amit Chandak, a Power BI Super User, demos how to use Field Parameters to make reports more dynamic.

Power BI Dev Camp Session 26

New Date - Check it Out!

Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.

Top Solution Authors