Hello,
It is not Embedded Resource
but MAUIFont
in MAUI, you could refer to Fonts in .NET MAUI to get the following content:
Fonts can also be added to other folders of your app project. However, in this scenario their build action must be manually set to MauiFont in the Properties window.
Therefore, you need to change the property of font file to MauiFont
in your library.
Then, after adding referrence, you could use the font file as the following:
fonts.AddFont("YourFontFile.ttf", "FontName");
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.