From my further reading, I understand that I cannot create a
File
object from a file that is an app resource and not on the actual system. What are my options then?
a
Abdulkadir Aminu
02/19/2025, 3:10 PM
If you're trying to use the font just do Res.font.your-font. Make sure its under the compose resources , under the font folder. It might not show the import, but just run your project and it might fail then the option to import will show when you check
d
Dovydas
02/20/2025, 7:36 AM
I needed to do that in androidMain so compose resources didn't work. I don't know why I didn't think about it earlier but what I just eneded up doing is copying the font to android resources and accessing it through R.