Forum Discussion

alexisjensennz's avatar
alexisjensennz
Frequent Visitor
4 years ago
Solved

Adding 2 custom fonts via json theme

Hi,

 

Due to custom corporate branding, we need to add a couple of custom fonts to Power BI and I have explored by a custom theme.  I have managed to get one in using:

 

{"name":"Fonterra_Theme_Recoleta_Alt",
"dataColors":["#01426a","#229DC4","#8DC8E8","#76B82A","#76881D","#768692","#008181","#b4b5df","#cd545b","#e57200","#ffc845","#6d4f47","#efdbb2"],
"visualStyles":{
"*":{
"*":{
"*":[
{"fontSize":12,
"fontFamily":"Recoleta Alt",
"color":{"solid":{}}}]}}}}

 

However, is it possible to bring a 2nd font (such as Roboto) into the theme? Or can only 1 be global and any other fonmts need to be applied to specific text classes or visual styles?

 

I appreciate your help.

 

Regards,

Alexis

  • Anonymous's avatar
    Anonymous
    4 years ago

    alexisjensennz 

    As far as I know, custom theme can only support 1 base font, you can only specify different fonts for each visual.

     

    {
        "name": "Custom Theme",
    	"dataColors": ["#3d4549", "#f9fafa", "#9ea2a4", "#ced0d2", "#f7ff1a", "#ff3838", "#00ccff", "#2aec2a"],
    	"background":"#FFFFFF",
        "foreground": "#0c161c",
        "tableAccent": "#0c161c",
        "visualStyles":{
                "tableEx": {
                    "*": {
                        "*": [
                            {
                                "fontFamily": "Abadi"
                            }
                        ]
                    }
                },
                "pivotTable": {
                    "*": {
                        "*": [
                            {
                                "fontFamily": "Arial Black"
                            }
                        ]
                    }
                },
             
            "*":{"*":{"*":[{"fontSize":12,"fontFamily":"DAZN Trim","color":{"solid":{}}}]}}}
    }

    Also check the solution:

    Solved: Can we add custom font (.ttf type) in Power BI des... - Microsoft Power BI Community 

     

     

     Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.

3 Replies

    • alexisjensennz's avatar
      alexisjensennz
      Frequent Visitor

      Hi,

      This only shows how to add custom fonts by individual visual style.  If possible, I need to import 2 custom fonts for global use.

       

      Regards,

      Alexis

  • Anonymous's avatar
    Anonymous
    Not applicable

    alexisjensennz 

    As far as I know, custom theme can only support 1 base font, you can only specify different fonts for each visual.

     

    {
        "name": "Custom Theme",
    	"dataColors": ["#3d4549", "#f9fafa", "#9ea2a4", "#ced0d2", "#f7ff1a", "#ff3838", "#00ccff", "#2aec2a"],
    	"background":"#FFFFFF",
        "foreground": "#0c161c",
        "tableAccent": "#0c161c",
        "visualStyles":{
                "tableEx": {
                    "*": {
                        "*": [
                            {
                                "fontFamily": "Abadi"
                            }
                        ]
                    }
                },
                "pivotTable": {
                    "*": {
                        "*": [
                            {
                                "fontFamily": "Arial Black"
                            }
                        ]
                    }
                },
             
            "*":{"*":{"*":[{"fontSize":12,"fontFamily":"DAZN Trim","color":{"solid":{}}}]}}}
    }

    Also check the solution:

    Solved: Can we add custom font (.ttf type) in Power BI des... - Microsoft Power BI Community 

     

     

     Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.