How to use Roboto (or thin) font in ICS +?

I can not find a way to install Roboto with condensed (thin), and not the default. Is it possible?

+4
source share
1 answer
  • Download the full version of Roboto

  • Copy Roboto-Condensed.ttf to the assets project folder

  • In the code, get a link to Typeface using Typeface robotoCond = Typeface.createFromAsset(context.getAssets(), "Roboto-Condensed.ttf")

  • Use this in any widget, for example. textView.setTypeface(robotoCond);

  • ???

  • PROFIT!

+18
source

Source: https://habr.com/ru/post/1435314/


All Articles