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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
SHTELVIS
Frequent Visitor

Custom font for buttons text

Hi everyone ,

 

I'm trying to add a custom font to a button text  in a dashboard i tried this json file and works for most of the dasbdoard except for the text in the  button  :

 

{"name":"Custom",

"textClasses":{
"lightLabel":{
"fontFace":"AMX Black"
},
"callout":{
"fontFace":"AMX Black"
},
"title":{
"fontFace":"AMX Black"
},
"header":{
"fontFace":"AMX Black"
}
}
}

SHTELVIS_0-1708975472892.png

 

It just changes the "EXAMPLE" title  but the text inside the button "Show Active Services" keeps with default font type

 

 

Thanks in advance for your help

1 ACCEPTED SOLUTION

Hi, @SHTELVIS 

 

You can try this Json file.

vyaningymsft_0-1709098750591.png

vyaningymsft_1-1709098808077.png

{
  "name": "AMX",
  
  "textClasses": {
    "label": {
      "fontFace": "AMX Black"
    },
    "header": {
      "fontFace": "AMX Black"
    },
    "callout": {
      "fontFace": "AMX BlackT"
    },
    "title": {
      "fontFace": "AMX Black"
    }
  },
  "visualStyles": {
    "*": {
      "*": {
        "border": [
          {
            "show": true
          }
        ],
        "outspacePane": [
          {
            "backgroundColor": {
              "solid": {
                "color": "#FFFFFF"
              }
            }
          }
        ]
      }
    }
  }
}

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

3 REPLIES 3
SHTELVIS
Frequent Visitor

Hi , @v-yaningy-msft 

 

Tried several times to re import the JSON file and is not working the text is Arial font , but the title is on the desired font AMX

Even tried this JSON file with more details and the button text still now showing AMX font

"name": "AMX",
"visualStyles": {"actionButton": {"*": {"text": [ { "fontFamily": "AMX"}]}}},
"textClasses": {
"title": {
"fontFace": "AMX",
"fontWeight": "500"
},
"label": {
"fontFace": "AMX",
"fontWeight": "400"
},
"callout": {
"fontFace": "AMX",
"fontWeight": "400"
},
"header": {
"fontFace": "AMX",
"fontWeight": "400"
},
"largeTitle": {
"fontFace": "AMX",
"fontWeight": "400"
},
"dataTitle": {
"fontFace": "AMX",
"fontWeight": "500"
},
"boldLabel": {
"fontFace": "AMX",
"fontWeight": "400"
},
"largeLabel": {
"fontFace": "AMX",
"fontWeight": "400"
},
"largeLightLabel": {
"fontFace": "AMX",
"fontWeight": "400"
},
"lightLabel": {
"fontFace": "AMX",
"fontWeight": "400"
},
"semiboldLabel": {
"fontFace": "AMX",
"fontWeight": "400"
},
"smallLabel": {
"fontFace": "AMX",
"fontWeight": "400"
},
"smallLightLabel": {
"fontFace": "AMX",
"fontWeight": "400"
},
"smallDataLabel": {
"fontFace": "AMX",
"fontWeight": "300"
}
}
}

 

Is may be a workaround or any way to re-write the JSON file to make it work ?

 

Thanks in advance @v-yaningy-msft 

Hi, @SHTELVIS 

 

You can try this Json file.

vyaningymsft_0-1709098750591.png

vyaningymsft_1-1709098808077.png

{
  "name": "AMX",
  
  "textClasses": {
    "label": {
      "fontFace": "AMX Black"
    },
    "header": {
      "fontFace": "AMX Black"
    },
    "callout": {
      "fontFace": "AMX BlackT"
    },
    "title": {
      "fontFace": "AMX Black"
    }
  },
  "visualStyles": {
    "*": {
      "*": {
        "border": [
          {
            "show": true
          }
        ],
        "outspacePane": [
          {
            "backgroundColor": {
              "solid": {
                "color": "#FFFFFF"
              }
            }
          }
        ]
      }
    }
  }
}

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

v-yaningy-msft
Community Support
Community Support

Hi, @SHTELVIS 

 

According to your description, you want to customize the button Text font, according to the json file you provided, the button Text font can be changed normally, you can try to re-import the json file again. I will feel free to help you about this problem.

vyaningymsft_1-1709002520161.png

 

vyaningymsft_0-1709002514216.png

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Users online (840)