Skip to content

How to use Fontawesome Icons Pro #729

Answered by enisn
Reanii asked this question in Q&A
Discussion options

You must be logged in to vote

Fonts are embedded resources and I can't embed licensed files into library and DLL files.

In this case, you should;

  • Download pro fonts and add Resources/Fonts folder of your project.

  • Then go to MauiProgram.cs and add your fonts like below:

    .ConfigureFonts(fonts =>
    {
       // Font Awesome Pro fonts
       fonts.AddFont("Font Awesome 5 Pro-Solid-900.otf", "FontAwesomeSolid");
       fonts.AddFont("Font Awesome 5 Pro-Regular-400.otf", "FontAwesomeRegular");
       fonts.AddFont("Font Awesome 5 Pro-Light-300.otf", "FontAwesomeLight");
       // etc. ...
    
    });
  • If you want to generate C# class for Glyph characters visit https://andreinitescu.github.io/IconFont2Code/ website and upload your font files to gene…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Reanii
Comment options

Answer selected by Reanii
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants