Forum Discussion
Custom Theme for Font Family
I need to create a JSON Theme file to make each and every text in my Power BI report to Font type - sans-serif.
How can I do that. Please share me the JSON script.
Hi, Anonymous
Solution 1 Change the extension of the Power BI Desktop file from pbix to zip, and then you will find a json file in Report folder. In this json file, you can find four key words: callout, title, header, label, you can change the value of fontFace under them to sans-serif.
"textClasses": {
"callout": {
"fontSize": 45,
"fontFace": "sans-serif",
"color": "#000000"
},
"title": {
"fontSize": 22,
"fontFace": "sans-serif",
"color": "#000000"
},
"header": {
"fontSize": 12,
"fontFace": "sans-serif",
"color": "#000000"
},
"label": {
"fontSize": 10,
"fontFace": "sans-serif",
"color": "#000000"
}
}
Solution 2 Here is a JSON Theme File. You can import this custom theme file by the following steps: View> Browse for themes> select the JSON theme file. However, this solution will overwrite some existing themes, such as affect the background color.
For more details, you can refer Setting formatted text defaults.
Best Regards,
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandak
Super User
- v-cazheng-msft
Community Support
Hi, Anonymous
Solution 1 Change the extension of the Power BI Desktop file from pbix to zip, and then you will find a json file in Report folder. In this json file, you can find four key words: callout, title, header, label, you can change the value of fontFace under them to sans-serif.
"textClasses": {
"callout": {
"fontSize": 45,
"fontFace": "sans-serif",
"color": "#000000"
},
"title": {
"fontSize": 22,
"fontFace": "sans-serif",
"color": "#000000"
},
"header": {
"fontSize": 12,
"fontFace": "sans-serif",
"color": "#000000"
},
"label": {
"fontSize": 10,
"fontFace": "sans-serif",
"color": "#000000"
}
}
Solution 2 Here is a JSON Theme File. You can import this custom theme file by the following steps: View> Browse for themes> select the JSON theme file. However, this solution will overwrite some existing themes, such as affect the background color.
For more details, you can refer Setting formatted text defaults.
Best Regards,
Caiyun Zheng
Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.