Using Roboto thin or condensed

做~自己de王妃 提交于 2019-12-10 12:36:33

问题


Is it possible to use Roboto thin or condensed style in ICS without having to include the .ttf and load it manually, I mean without using:

Typeface.createFromAsset(this.getAssets(),"fonts/DroidSerif-Bold.ttf");

回答1:


Versions of Android older than 4.1 include just four basic styles of Roboto: Regular, Bold, Italic and BoldItalic. There is no way to use thin or condensed styles in ICS without assets.

Android 4.1 (JellyBean, API16) and up includes several more Roboto styles:

  • Regular
  • Italic
  • Bold
  • Bold-italic
  • Light
  • Light-italic
  • Condensed regular
  • Condensed italic
  • Condensed bold
  • Condensed bold-italic


来源:https://stackoverflow.com/questions/10485902/using-roboto-thin-or-condensed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!