I want to use external fonts in my app. I have tried adding new fonts
using AssetManager
but it did not work. Below is my code:
Typeface face; face = Typeface.createFromAsset(getAssets(), "font.otf"); textview.setTypeface(face);
but its not showing the text...
Please help me with this.
Once you download the fonts of your choice, unzip the folder and copy the font file. By creating a new Android resource directory: Step 1: In the project's resource folder, create a new Android Resource Directory of Resource type: font and paste this 'ttf' file here.
To change font styles in GO Launcher, copy the TTF or OTF font files on your phone. Long press on the home screen and select GO Settings > Font > Select Font. Pick the font you want or tap Scan to add files stored on your device. This won't be a system-wide change but will include the menus and app icons.
AFAIK, Android does not support OpenType. Use a TrueType font instead.
UPDATE: Apparently OpenType is now supported, at least somewhat. It was not supported originally, so you will want to test your font thoroughly on whatever versions of Android your app will support.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With