Forum Discussion

ryan_b_fiting's avatar
ryan_b_fiting
Icon for Post Patron rankPost Patron
4 years ago

Power BI Theme - Custom Font

Hello Community - 

 

I am trying to add a custom font to my report.  My client uses a font that is not generally available in Power BI and I am trying to add it within my JSON file.  Below is my JSON file code, but this only allows me to select the custom font for Titles and Text Box font.  Is there a way that I can update the below code so that the font will be used across all text in the report?

 

 

{"name":"Jke Theme",
"visualStyles":{"*":{"*":{"*":
[{"fontSize":12,
"fontFamily":"Kalinga",
"color":{"solid":{}}}]}}},"dataColors":["#2A1A60","#00A9E1","#02506A","#5B45A4","#E044A7","#744EC2","#D9B300","#D64550"]}

 

 

Thank you!

Ryan

2 Replies

  • v-chenwuz-msft's avatar
    v-chenwuz-msft
    Icon for Community Support rankCommunity Support

    Hi ryan_b_fiting ,

     

    There are 12 text classes, but you need to set only four classes, called primary classes, to change all of the text formatting in your report. Other text classes, considered secondary classes, automatically derive their properties from their associated primary classes. Often, a secondary class selects a lighter shade of text color, or a percentage large or smaller text size compared to the primary class.

     

    You can refer this json:

    {
        "name": "Custom Theme",
        "textClasses": {
            "callout": {
                "fontSize": 45,
                "fontFace": "DIN",
                "color": "#252423"
            },
            "title": {
                "fontSize": 12,
                "fontFace": "DIN",
                "color": "#252423"
            },
            "header": {
                "fontSize": 12,
                "fontFace": "DIN",
                "color": "#252423"
            },
            "label": {
                "fontSize": 10,
                "fontFace": "DIN",
                "color": "#252423"
            }
        }
    }

     

    For more details, please refre this official article.

    Use report themes in Power BI Desktop - Power BI | Microsoft Docs

     

    Best Regards

    Community Support Team _ chenwu zhu

     

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

    • ryan_b_fiting's avatar
      ryan_b_fiting
      Icon for Post Patron rankPost Patron

      v-chenwuz-msft unfortunately that does not apply the font to all text in the report.  It applies it to labels, titles, headers and callouts just like the json file says.  I believe all 12 classes need to be identified.