Fontawesome, Font not found until it's selected
Hello,
I start a new project in which I use Fontawesome to display some icons.
I add the followinf resource into my MainWindow.xaml (because in the App.xaml the StaticResource is not found):
When I launch the scene , the font is not found, and the scene don't display the right icon.
But if I click on the "fa-solid-900.asset" to select it into the Unity UI, then launch the scene, it shows me the right icon. (but the error "not found" still here)
I start a new project in which I use Fontawesome to display some icons.
I add the followinf resource into my MainWindow.xaml (because in the App.xaml the StaticResource is not found):
Code: Select all
<ResourceDictionary>
<FontFamily x:Key="FontAwesome">../Fonts/fa-solid-900.ttf#Font Awesome 5 Free</FontFamily>
</ResourceDictionary>
But if I click on the "fa-solid-900.asset" to select it into the Unity UI, then launch the scene, it shows me the right icon. (but the error "not found" still here)
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: Fontawesome, Font not found until it's selected
One question, if you select MainWindow asset in the editor, does it show the font as a dependency in the inspector?
Re: Fontawesome, Font not found until it's selected
No, all dependencies are empty
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: Fontawesome, Font not found until it's selected
Ok, it seems there is a problem with the dependencies when the font path includes the ttf file.
Could you please try with the following:
Could you please try with the following:
Code: Select all
<FontFamily x:Key="FontAwesome">../Fonts/#Font Awesome 5 Free</FontFamily>
Re: Fontawesome, Font not found until it's selected
Thank you very much... it works perfectly.
Who is online
Users browsing this forum: Semrush [Bot] and 92 guests