How do you pick a .ttf file from phone and change the Font typeface of a label based on what was picked?

I want to create a simple font tester. How can I use the file picker to change the font of a label

Edit: To clarify my situation, I have a font selector on my app to change the font of a label. But I want to be able to upload my own custom font through the app itself using a file picker and not through the designer.

Please find the solution video below :

You might be able to use the MyFonts extension for this.

I am sure the OP didn't want to change the font through the designer, but through the app itself.

1 Like

You need to show your blocks, to provide a solution...

How would I be able to do that?

I tried this but it only shows an error


It needs a (real) path, not a contentUri.

Even I need some help with this too, sometimes I do not understand the obvious that well, How would I go about converting the URI into a "real" path?

I've taken multiple approaches to convert it, but since I don't understand how the conversion works, I'm stuck with errors...

Here's what I've tried so far:

Even after searching up the concepts on this forum and the Web, all the topics just went over my head...

Use the the pathFromUri method of the FileTools extension from @vknow360 .

I tried both methods I know to get the path of the .ttf file, but it still won't import


How would i use this extension? As i only started learning last week, I don't really know the advanced stuffs and I don't know what SAF means or how to use any parts of the extension. I really only want to be able to import my own font using the app itself and not the designer.

Then upload the .ttf files to the assets (Media) and access them from there.

Send me your .ttf while I will make a solution for you.

@HarshVardhanSolanki

You did not respond to this...

That time he misunderstood the question and did the work via designer, so no blocks was used hence he did not respond to your post...

Okay, I am going to show it through the blocks.

I only make help from Companion and only from assets,

Not as filepicker work for me as @Anke said before it needs SAF to execute and I knew the path which needs to be implement but i can't do that.

File :
Test.aia (260.9 KB)

So all you showed in your video was how to set a custom font in the designer ?

Your companion example is next to useless for production/compiled app purposes. You can use the file component to get the Assets path. Your blocks do not even show how you get the path. As you say, SAF is required if using FilePicker to select a font file not created by the app.

Anke's suggestions of assets or ASD as file locations still stands, along with using SAF for foreign files.

1 Like

This is working for installed app and companion app both, but not for foreign files, only for Asset files.

I don't have knowledge to get the foreign file.