I have some custom fonts in assets/fonts
folder. Now I want to know how I can create separate fonts for different local just like string resource folder. So that depending on the language selected the fonts are also selected that are meant for that language only. Please help me to solve this out with an example.
Asked
Active
Viewed 725 times
0

iknow
- 8,358
- 12
- 41
- 68

AndroidDev
- 4,521
- 24
- 78
- 126
-
Not an exact duplicate, but: http://stackoverflow.com/questions/5427933/localization-of-assets-files – Egor Mar 06 '12 at 14:09
-
Short example for various locale in assets folder is here http://stackoverflow.com/a/42257279/7472719 – Andrej Hriciga Feb 15 '17 at 18:32
1 Answers
1
Now i want to know how i can create separate fonts for different local just like string resource folder
Give the font files different names, and manually choose the right name given the locale. Assets, unlike resources, do not have resource sets, and so Android has no means to automatically choose different asset files based on device characteristics like locale.

CommonsWare
- 986,068
- 189
- 2,389
- 2,491
-
Actually i have some custom fonts in my assets/fonts folder but for Swedish language some of the character in my text is missing due to this custom fonts. so what i want is whenever user select a Swedish language it will allow him to take default font instead of custom fonts. so how that can be done – AndroidDev Mar 06 '12 at 14:35
-
@Anshuman: What, **specifically**, do you not understand how to do? What have you tried? What errors are you getting? – CommonsWare Mar 06 '12 at 14:43