Open Davidoutz opened 3 years ago
@Davidoutz I have the same issue. Did you manage to fix it?
@sinsedrix unfortunately not yet. But somewhat I am happy to see that I am not the only one :)
I have the same issue
I'm on windows 11 but have the same issue also.
Have anyone fixed this problem. is it a problem with maui or winui 3 itself.
To make the fonts load correctly, you have to rename the fontFamily.
Go to Startup.cs and change these lines to fix it:
.ConfigureFonts(fonts => {
fonts.AddFont("fa-solid-900.ttf", "FontAwesome");
- fonts.AddFont("OpenSans-Regular.ttf", "OpenSans-Regular");
+ fonts.AddFont("OpenSans-Regular.ttf", "Open Sans Regular");
- fonts.AddFont("OpenSans-SemiBold.ttf", "OpenSans-SemiBold");
+ fonts.AddFont("OpenSans-SemiBold.ttf", "Open Sans SemiBold");
})
A similar issue was confusing many of us with react-native-windows. See microsoft/react-native-windows/issues/652 for reference.
I installed all prerequisites for .Net MAUI, the latest VS 2022 (17.0.0 Preview 2.1) and the maui-check. Everything looks good from this perspective and I can create a new maui project and run it on any platform. Nevertheless I've tried to download and run the weather app as is. While it's working fine on android, on windows (10.0.19043) it shows the first page but no content nor the menu/tabbar.
I see from the output that it cannot fetch a font for some reasons:
But even when I remove the fonts I still have the same behavior so I don't think this is related.
Any idea what could I be missing ?