cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Super User

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
          }
        ]
      }
    }
  }
}

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
Super User

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
          }
        ]
      }
    }
  }
}

Near SE WI? Join our PUG Milwaukee Brew City PUG
ballanda Frequent Visitor
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
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
Super User

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
          }
        ]
      }
    }
  }
}

Near SE WI? Join our PUG Milwaukee Brew City PUG
VictorMolenaar New Member
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
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Users Online
Currently online: 360 members 3,355 guests
Please welcome our newest community members: