Following this procedure, I want to set the font of all text in the android app to a specific name. It is a non-english font, so I paste that in app\src\main\assets\fonts
and wrote the following in styles.xml
<item name="android:fontFamily">@fonts/my.ttf</item>
<item name="fontFamily">@fonts/my.ttf</item>
However, after building and running the app inside the android studio (the emulator pops up), I see the default font and not the font I specified.
BTW, in that post, it uses @font
. However, if I write that, I see an error that the font is not found. By changing @fonts
, the compilation error is solved!
What is missing here?