Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: load custom font in SD card

Is it possible to use a custom font in android which is stored in the SD card? What I've seen so far indicates the font file must be in the assets folder. Please tell me I'm wrong.

like image 422
Jack BeNimble Avatar asked Jun 14 '11 19:06

Jack BeNimble


People also ask

How do I add custom fonts to my Samsung?

From Settings, search for and select Font size and style. Then, tap Font size and style again. Tap Font style, and then tap + Download fonts. The Galaxy Store will automatically launch; tap the Install icon next to your desired font.

Where are Android fonts stored?

Verify that the ttf fonts files are in the /product/fonts folder on the device.


1 Answers

Typeface.createFromFile() takes a String path or File.

Typeface typeface = Typeface.createFromFile(
    new File(Environment.getExternalStorageDirectory(), "font.ttf"));
like image 141
Steve Prentice Avatar answered Oct 13 '22 12:10

Steve Prentice