Forum Discussion

jamestieu's avatar
jamestieu
Frequent Visitor
5 years ago

Importing MULTIPLE Fonts in Power BI?

I am trying to import the Assistant font.

 

However, when I do so, I only have the option of "Assistant" and not its various styles.

 

For example: "Assistant-Bold", "Assistant-ExtraBold", "Assistant-ExtraLight", "Assistant-Light", "Assistant-Medium", "Assistant-Regular", "Assistant-SemiBold".

 

I am using the JSON object below to import my custom theme.

 

{"name":"Custom","dataColors":["#8285D8","#1F1F29","#EBEBEB","#F8F8F8","#08080F", "#013E61", "#41007B"],"visualStyles":{"*":{"*":{"*":[{"fontFamily":"Assistant", "color":{"solid":{}}}]}}}}

 

Can someone help me with being able to import these multiple fonts?

3 Replies

  • selimovd's avatar
    selimovd
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hey jamestieu ,

     

    the fonts in your JSON have to have the identical name like in the folder C:\Windows\Fonts

    If you have multiple font files (for example "Assistant-Bold.ttf", "Assistant-ExtraBold.ttf", "Assistant-ExtraLight.ttf", etc.), then you have to add all of them to your JSON file.

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis
     

     

    • jamestieu's avatar
      jamestieu
      Frequent Visitor

      Hi Den,

       

      I tried something like this:

      {"name":"Custom","dataColors":["#8285D8","#1F1F29","#EBEBEB","#F8F8F8","#08080F", "#013E61", "#41007B"],"visualStyles":{"*":{"*":{"*":[{"fontFamily":"Asssitant-Light.ttf, Assistant-Bold.ttf", "color":{"solid":{}}}]}}}}

      But then I got this:

       

      I also tried this:

      {"name":"Orkestra","dataColors":["#8285D8","#1F1F29","#EBEBEB","#F8F8F8","#08080F", "#013E61", "#41007B"],"visualStyles":{"*":{"*":{"*":[[{"fontFamily":"Asssitant-Light.ttf", "color":{"solid":{}}}], [{"fontFamily":"Asssitant-Bold.ttf", "color":{"solid":{}}}]]}}}}

       

      You will see a multi-level list of font-families in the object:

      [[{"fontFamily":"Asssitant-Light.ttf", "color":{"solid":{}}}], [{"fontFamily":"Asssitant-Bold.ttf", "color":{"solid":{}}}]]

       

       

      It imported successfully, but none of the fonts are available to use.

       

      Can you help?