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
June 2020 Community Challenge: Can You Solve These?

June 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors