Levi's Blog

Category: Uncategorized

Android custom fonts and memory issues: a quick fix

Android allows you to import custom fonts into your project (just copy a .ttf file into your assets folder and you’re good to go). Typically, you’ll grab the custom font, like this Typeface myTypeface = Typeface.createFromAsset(getResources().getAssets(), "fonts/DroidSerif-Bold.ttf"); If you’re using custom fonts a lot (constantly grabbing the font inside of your Views or Activities), it […]

Back to top