Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
hello dear people,
in Power BI Custom Visuals I'm trying to develop a simple card visual. There I want to have the possibility to change the fonts of my elements in my SVG. I do this with the help of the FontControl inside my Custom Visual project file.
When I change the font to "DIN", the FontControl does not apply it to its element, instead uses something else. I looked up with the console.log on Power BI Webservice which value it uses instead of "DIN". And it shows "wf_standard-font, helvetica, arial, sans-serif" when I select "DIN" in my FontControl.
The FontControl has bold, italic, underline, fontSize and fontFamily as properties. As an alternative I tried to use the FontPicker but unfortunately had the same outcome as the FontControl.
I looked up several other posts in our Power BI Forums regarding to font, with no success for me.
For a different approach I tried to make use of the Custom Themes of Power BI Desktop. With a .json I set the fontFamily globally to "DIN" and with "wf_standard-font, helvetica, arial, sans-serif" too. When I loaded my Custom Visual to Power BI Desktop, the results are the same as prior to my approach with FontControl/FontPicker.
Here are the links for the implementation of Custom Themes in Power BI:
Here are screenshots of my project as reference:
And for some reason in the format pane under General > Title, the font uses the correct "DIN" in contrast to my Visual > "Wert" with "DIN":
thanks in advance
Solved! Go to Solution.
Hi @Andrelele,
For some reason, DIN or the underlying font is unavailable for custom visuals, but you can package it in your visual and reference it to provide some continuity. Here's an example of how I've solved the problem for the HTML Content visual, which involved:
Good luck,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Dear Daniel,
it worked in my project! Thank you very much.
Sincerely,
Andrelele
Hi @Andrelele,
For some reason, DIN or the underlying font is unavailable for custom visuals, but you can package it in your visual and reference it to provide some continuity. Here's an example of how I've solved the problem for the HTML Content visual, which involved:
Good luck,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.