cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Theming - Usage of the "Segoe (Bold)" font

Hello all..

 

I am tryiing to use the "Segoe Bold" font in a theme JSON file.  But the result is always Segoe UI, not bold.  I was thinking that maybe the parentheses in the font name cannot be understood in the JSON.  Has anybody been able to make Segoe (Bold) work in a theme file?

 

Here's an example of what I am trying:

        "header": [
          {
            "show": true,
            "fontFamily": "Segoe (Bold)",
            "fontColor": {
              "solid": {
                "color": "#415566"
              }
            },
            "textSize": 8
          }
        ]
7 REPLIES 7
Super User III
Super User III

Re: Theming - Usage of the "Segoe (Bold)" font

@Anonymous The below syntax worked for me. Alternatively, this is the output for just choosing the properties from the theme generator in powerbi.tips (check it out if you aren't familiar) -> https://powerbi.tips/tools/report-theme-generator-v3/ It allows you to choose the properties you want and automatically downloads the JSON file for you.

 

{
  "name": "My Theme",
  "visualStyles": {
    "*": { "*": { "*": [ { "color": { "solid": {} } } ] } },
    "tableEx": {
      "*": {
        "columnHeaders": [
          {
            "fontColor": { "solid": { "color": "#123456" } },
            "fontFamily": "Segoe (Bold)",
            "fontSize": 24
          }
        ]
      }
    }
  }
}

Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG
Anonymous
Not applicable

Re: Theming - Usage of the "Segoe (Bold)" font

Hi Seth,

 

Thanks for the reply.  I'm aware of the Power BI theme generator.  I also found these useful: Template Theme Files for Power BI Visuals

 

I should have been more specific in my post... If you specify "Segoe (Bold)" as your font in the JSON, it does add it but it has no effect because apparently it doesn't match with what Power BI Desktop understands as "Segoe (Bold)".  If you look in the screenshot, you'll see the "Segoe (Bold)" at the bottom of the list is a duplicate with the one that actually works.  

 

If you put any invalid font name in there, it just adds it to the bottom of the list and it does nothing.  Segoe (Bold) is the only valid font name that has this problem.  That's why I was thinking it is an issue with the parentheses in the name.  But I couldn't find any info on if/how parentheses need to be escaped in JSON. 

 

screenshot

Super User III
Super User III

Re: Theming - Usage of the "Segoe (Bold)" font

Gotcha, after some quick checking around we can remove the weight from the name and make it a seperate element. This code produces the expected result.

{
  "name": "My Theme",
  "visualStyles": {
    "*": { "*": { "*": [ { "color": { "solid": {} } } ] } },
    "tableEx": {
      "*": {
        "columnHeaders": [
          {
            "fontColor": { "solid": { "color": "#123456" } },
            "fontFamily": "Segoe",
            "fontWeight": "Bold",
            "fontSize": 24
          }
        ]
      }
    }
  }
}

Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG
ballanda
Frequent Visitor

Re: Theming - Usage of the "Segoe (Bold)" font

When I try this, it comes out looking like times new roman.  bummer

ballanda
Frequent Visitor

Re: Theming - Usage of the "Segoe (Bold)" font

Here's the values that work in fontFamily for the Segoe UI family...

 

- Segoe UI Light

- Segoe UI Regular

Segoe UI Semibold

- Segoe UI Black

 

These values aren't recognized and produce a Times New Roman font, which is cool if you have a time machine that goes to 1994...

- Segoe UI Light Italic

- Segoe UI Semilight

- Segoe UI Semilight Italic

- Segoe UI Italic

- Segoe UI Bold

- Segoe UI Black Italic

- Segoe UI Bold Italic

 

The fontWeight property doesn't work at all, and it isn't mentioned here: https://docs.microsoft.com/en-us/power-bi/desktop-report-themes

 

I gan get by with Segoe UI Semibold and Segoe UI Black in my theme JSON.  So all good.  

 

</thread>

Super User III
Super User III

Re: Theming - Usage of the "Segoe (Bold)" font

@ballanda huh. Must have botched my own test. You are correct, the above does not work. However, I'm going to take another stab here 🙂 

I did find this ->https://github.com/Microsoft/powerbi-visuals-heatmap/blob/master/capabilities.json and digging into that code had an example of Segoe UI Bold. Can't say I understand the string, or reasoning but it appears to work.

 

{
  "name": "My Theme",
  "visualStyles": {
    "*": { "*": { "*": [ { "color": { "solid": {} } } ] } },
    "tableEx": {
      "*": {
        "columnHeaders": [
          {
            "fontColor": { "solid": { "color": "#123456" } },
            "fontFamily": "'Segoe UI Bold', wf_segoe-ui_bold, helvetica, arial, sans-serif",
            "fontSize": 24
          }
        ]
      }
    }
  }
}

Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG
Highlighted
VictorMolenaar
New Member

Re: Theming - Usage of the "Segoe (Bold)" font

@Seth_C_Bauer This solution is working for me aswell, thanks a lot!!

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors