Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to access a shape's 'text' property in .json theme file and add a font

Hello, 

I need to add a font in the theme to be available in the Text property of any shape object (the one highlighted in the image below)

PowerBoy_0-1635452286316.png




I can access the rectangle object via 'shape' visual object, but I don't know what are the other properties to get to add a font. 

I tried the following code, but it doesn't work:

 

"visualStyles" : {
"shape" : {
  "*": {
     "text": [{"fontFamily": "Ogg Regular"}]
       }
          }
                 }

 


It seems that line 

 

 "text": [{"fontFamily": "Ogg Regular"}]

 

isn't correct, and here is where I need help. 

I couldn't see in the documentation any cardName property that looks like the one I need. 

Do you know how can I reach this property and add a font?

Thanks

2 REPLIES 2
amitchandak
Super User
Super User

Anonymous
Not applicable

Hello, I couldn't make use of the solution that appears in the link. I need to add a new font to the Text section of a shape object. 

The question is what card property to I have to access in the .json in order to get to the Text section and add the font, if exists. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.