Font import error

Hello

I want to use imported font for some button
On the Designer it works, but when I want to test on the phone I got an error "Font asset not foung HelveticaSRegular.ttf"
What is wrong ?

You are using the ttf Fonts.

The following is a collection of information about the use of ttf Fonts that work with App Inventor since the release of nb191 and Companion 2.66 .

Static ttf fonts work with the new Font control; variable fonts (customizable typefaces) do not. Perhaps that is your issue.

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

grafik

Thank you all,
as in the link given by Ank, I think my problem comes from the Android version;

I get the message:

"java.lang.RuntimeException: Unable to start activity ComponentInfo{appinventor.ai_herve_pipon.Wifi RemoteCo ntrol_revD/appinventor.ai_herve_pipon.Wifi RemoteControl_ revD.Screen1}: java.lang.RuntimeException: Font asset not found HelveticaSRegular. ttf
at android.app.ActivityThread.performLaunchActivity(Activity
Thread.java:2747)" on the phone

To do my tests I use an old phone that has a small screen.
On my last phone I have no problem.

Is there a simple way to copy fonts to the right places for android versions < 10

Yes, use the File component and copy the font.ttf from the assets to this path:
/storage/emulated/0/AppInventor/assets/font.ttf

1 Like

Example:

Yes, the MIT Font control does not work with Android 9 and lower.

I wanted to make a simple fix on Github, I started, but Evan made it too complicated and demanded to add error handling. I asked some questions to better understand the requirements, but silence for a long time. If it wasn't for that, there would already be a fix in nb193. I wonder how they passed this error in nb191, since now they demand such an extensive fix.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.