web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Custom font in PCF con...
Power Apps
Answered

Custom font in PCF control

(0) ShareShare
ReportReport
Posted on by 39

Hello experts,

 

In my PCF control, I need to include a custom font (sap-icons.ttf) to display icon.

Is there any way to achieve that?

 

Thanks,

Kim Anh

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi @kalluu91  , 

     

    The manifest doesn't support any ttf files. I needed that too, and the only workaround I could come up, was to try to declare it as image. So you can use in the manifest (eventually rename your ttf to a png to avoid checks here, or just remove the extension)

    <resources>
     <img path="your_path_to_ttf.png" />
    </resources>

    and in the end try to load it using context.resources.getResource(..)

     

    In some cases, there could work if you have the icons declared inside the css, using the icon url with a relative path  ( like  src: url(./your_ttf) ) . That would save you the loading the resource by yourself. But it works only sometimes, it depends what kind of app you are using.

     

    But all these are kind of unsupported. Would be great if you can find another way to get the icons.

     

    Hope this helps!

     

  • Verified answer
    RMCoder Profile Picture
    219 on at

    If your font is web-hosted, you can import it in your CSS. Try following this short guide, which uses font-awesome.

     

    If your font is local to your machine you will need to upload it somewhere and do the same. I haven't tried this approach, but I found this article from 2016 that describes uploading the font file as a .CSS web resource to be used in an HTML page. I imagine you could do the same to host the font file for your PCF control.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard