I need to download fonts directly from my android studio project from url https://github.com/google/fonts/blob/master/apache/roboto/Roboto-Regular.ttf. And downloaded fonts should be in my studio projects under fonts directory.
Asked
Active
Viewed 663 times
1
-
what you have tried so far?? – Rahul Khurana Aug 01 '17 at 05:34
-
and what is the problem? can't you click the link and download the file? – Vladyslav Matviienko Aug 01 '17 at 05:42
-
1yes, I wanted to do I I can get this URL from API .After that, it should be automatically downloaded from URL under fonts directory.so every API Call URL might be differ. – saiRam89 Aug 01 '17 at 05:44
-
I guess OP is looking for this https://developer.android.com/preview/features/downloadable-fonts.html – Ajay S Aug 01 '17 at 05:44
-
try this https://developer.android.com/preview/features/downloadable-fonts.html – Sandeep dhiman Aug 01 '17 at 05:44
-
ok thnk u all let me try – saiRam89 Aug 01 '17 at 05:46
-
this link may help you https://stackoverflow.com/a/38167538/3983054 – King of Masses Aug 01 '17 at 05:47
-
yes exactly need this only will try tnks – saiRam89 Aug 01 '17 at 06:35
1 Answers
1
Download font file from Github after that follow these steps.
Go to the (project folder)
Then app>src>main
Create folder assets>fonts into the main folder.
Put your Roboto-Regular.ttf into the fonts folder.

Shahzain ali
- 1,679
- 1
- 20
- 33
-
Normally we are done in this way but I need by using URL it has to be downloaded automatically and should save under fonts directly URL might be dynamic URL. – saiRam89 Aug 01 '17 at 05:41
-
I know that it can be done through flutter, but don't know any way for android – Bensal Jun 14 '21 at 04:28