Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import a google-font into powerBI to use as a theme. The theme is a JSON file

I am creating a theme for the corporate branding in our PowerBI reports. The issue I have is that the font I want to use isn't a default PowerBI font and I don't know how to import it either with the theme or into the software and save it. This forum suggests there is a way to import a google-font as part of theme but I can't get it working and I'm not sure where to put the code snippet.

The font I want to use is Rubik, and the JSON code I have which specifies the font is:

"background": "#ffffff",
"foreground": "#000000",
"tableAccent": "#FF637D",
"dataColors": [ "#003E51", "#00BFD6", "#BCBCBB", "#8AD4EB", "#575756", "#C8D308" ],    
"visualStyles": {
        "*": {
            "*": {
                "*": [
                    {
                        "fontSize": 12,
                        "fontFamily": "DIN",
                        "color": { "solid": {} }
                    }
                ],
                "general": [ { "responsive": true } ]
            }
        },

I think my expected outcome will be to use a code snippet like:

@import (less) url('https://fonts.googleapis.com/css?family=Lato');

someone in the file then I can change "fontFamily" to "Rubik" like:

"fontFamily" : "Rubik",
like image 576
Callum Smyth Avatar asked Jan 27 '23 17:01

Callum Smyth


1 Answers

Power BI does not support custom fonts for standard visuals and themes. The forum post you are referring to, relates to developing a custom visual, which is a different topic than creating a Power BI theme.

If you'd like to use custom fonts in Power BI, please consider voting for that:

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/9007054-allow-fonts-to-be-customized

like image 184
Dan Avatar answered Feb 07 '23 19:02

Dan