0

I have a bilingual program (Persian, English). I want the font of the program to change when the Persian language is selected And when the English language is selected, the default font (Them) will be applied

In simple words, I want to change the font of the entire program from the activity

Persian

English

val typeface = Typeface.createFromAsset(activity.assets, "fonts/my_font.ttf")


activity.findViewById<View>(android.R.id.content).setTypeface(typeface)

I tested but it didn't work

Mati
  • 1
  • 2
  • Does this answer your question? [Android different font for each language](https://stackoverflow.com/questions/54836812/android-different-font-for-each-language) – bongo Feb 01 '23 at 08:04
  • I want to change the font from within the activity – Mati Feb 01 '23 at 09:45
  • please refer this one [solution](https://stackoverflow.com/questions/4395309/android-want-to-set-custom-fonts-for-whole-application-not-runtime) – Hitesh Khatri Feb 02 '23 at 09:18

0 Answers0