MartinTopfstedt/FontAwesome6

How to use this?

cptalpdeniz opened this issue · 4 comments

First of all, thank you! I'm trying to use this but this is not very straight forward. There is no clear step-by-step installation. Readme is very comprehensive but it's also confusing. There is multiple methods overlapping with each other. Pretending that installation was successful, how can I use this as icon? Especially for or ? As trying to use the glyphs didn't work, I looked for alternatives and found this however I don't understand how to use it. Readme says check examples for advanced usage, the examples are very shorts and don't work.

Hi, what nuget package do you use?

I've used the FontAwesome6.Pro.Fonts nuget package.

ok, i assume you are using .Net with WPF.

  • Did you download the Web Version of the FontAwesome Pro Icons?
  • Did you copy the *.ttf fonts into your project and included them as "Content" and "Copy Always"
    <ItemGroup Condition="'$(Configuration)'=='DebugPro' Or '$(Configuration)'=='ReleasePro'">
    <EmbeddedResource Include="..\..\generated\Font-Awesome-Pro\FontAwesomeSvg.all.json" Link="Svg\FontAwesomeSvg.all.json" />
    <Content Include="..\..\Font-Awesome-Pro\webfonts\fa-regular-400.ttf" Link="Fonts/fa-regular-400.ttf">
    <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
    <Content Include="..\..\Font-Awesome-Pro\webfonts\fa-solid-900.ttf" Link="Fonts/fa-regular-900.ttf">
    <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
    <Content Include="..\..\Font-Awesome-Pro\webfonts\fa-light-300.ttf" Link="Fonts/fa-light-300.ttf">
    <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
    <Content Include="..\..\Font-Awesome-Pro\webfonts\fa-thin-100.ttf" Link="Fonts/fa-thin-100.ttf">
    <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
    <Content Include="..\..\Font-Awesome-Pro\webfonts\fa-brands-400.ttf" Link="Fonts/fa-brands-400.ttf">
    <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
    <Content Include="..\..\Font-Awesome-Pro\webfonts\fa-duotone-900.ttf" Link="Fonts/fa-duotone-900.ttf">
    <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    </Content>
    </ItemGroup>
  • Did you add the loading of the *.ttf file to you App class? (https://github.com/MartinTopfstedt/FontAwesome6#load-the-font-files-from-the-file-system)

If all this has been done right the icons are shown when you run the program, they are not shown in Visual Studio. For that you need do this: https://github.com/MartinTopfstedt/FontAwesome6#load-icons-inside-designer.

I did all of this however it still did not work. In fact, I had multiple issues so I dropped FontAwesome support completely. Thank you for your help Martin! I'm closing this issue.