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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Balogh1Bence
Helper II
Helper II

add new fontFamily

Hi!

Is it possible to add new fonts to the fontFamily type settings? If so, how can I do that? 

1 ACCEPTED SOLUTION

Hi @Balogh1Bence,

The linked Gist is the workaround - here's the original official suggestion from the custom visuals team. You replace your property in the capabilities.json with this enumeration, rather than the fontFamily type, and then add/modify the list as you need for the font families you want. Note that the fontFamily type contains the standard list of fonts for Power BI and is intended to be this way for consistency with the core visuals, so if you're adding your own, your results might vary for users on other browsers and operating systems.

You can indeed save a property value into the visual's dataView with persistProperties and this might work in your visual code, but this does not expose the value as a usable selection to the properties pane - for lists, you will need corresponding property metadata declared in your capabilities.json for it to show as an entry.

Because the properties pane is managed by the main Power BI window and not the visual (which is sandboxed from the main UI), the JSON in your capabilities tells Power BI how to render the properties in the pane for your visual.

Perhaps you could provide some further detail on what you are trying to achieve, along with the font you're trying to see in the list and I can provide a revised enumeration for you.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

3 REPLIES 3
dm-p
Super User
Super User

Hi @Balogh1Bence,

The fontFamily type is a preset list and cannot be modified. If you want to customise, you'll need to manually recreate the list with an enumeration array. I've recently answered a similar question and already have a Gist you can use for this so you don't have to do it all from scratch - hopefully this can save you some time.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Thanks, but I could modify the kist using persisproperties, problem is that its for saving new settings and not for adding new options, isn't there a workaround?

Hi @Balogh1Bence,

The linked Gist is the workaround - here's the original official suggestion from the custom visuals team. You replace your property in the capabilities.json with this enumeration, rather than the fontFamily type, and then add/modify the list as you need for the font families you want. Note that the fontFamily type contains the standard list of fonts for Power BI and is intended to be this way for consistency with the core visuals, so if you're adding your own, your results might vary for users on other browsers and operating systems.

You can indeed save a property value into the visual's dataView with persistProperties and this might work in your visual code, but this does not expose the value as a usable selection to the properties pane - for lists, you will need corresponding property metadata declared in your capabilities.json for it to show as an entry.

Because the properties pane is managed by the main Power BI window and not the visual (which is sandboxed from the main UI), the JSON in your capabilities tells Power BI how to render the properties in the pane for your visual.

Perhaps you could provide some further detail on what you are trying to achieve, along with the font you're trying to see in the list and I can provide a revised enumeration for you.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.