-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ANDROID] Font Asset Not Found: java.lang.RuntimeException - OpenSansSemibold #17872
Comments
Going by your sample project and your csproj, I believe that error is correct: You didn't embed a font. If you include an EmbeddedResource of a font, and use the correct file name and font name, it should work. You may want to refer to the documentation. |
I have verified the sample, and I have set the Build Action for the font file as 'Embedded Resource' and ensured that it is added with the correct file name. However, I am still encountering the problem |
any progress now? |
As far as I can tell, there's no bug. As I wrote above, I would file a new issue if you're having a problem with it, preferably with an example showing what you're trying to do. |
Thank you,just solved this problem by clear previous data and rebuild .During testing,the font could be found in the apk,but exceptions keep appearing when the code is run.A little strange. |
Description
Encountering a java.lang.RuntimeException: Font Asset 'OpenSansSemibold' Not Found When Registering the Font as an Embedded Resource with the Font File Action Type as Embedded Resource
Code Snippet
MauiProgram.cs
fonts.AddEmbeddedResourceFont(typeof(MauiProgram).Assembly,"OpenSans - Semibold.ttf", "OpenSansSemibold");
Screen Shot
Steps to Reproduce
1.Run the attached sample.
2.Open Output Window
Link to public reproduction project repository
https://github.com/RiyashameedM/SimpleSampleFont
Version with bug
7.0.92
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
7.0.92
Affected platforms
Android
Affected platform versions
Android 13
Did you find any workaround?
No
Relevant log output
The text was updated successfully, but these errors were encountered: