Android 使用 Roboto 精简版或精简版

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10485902/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 03:56:47  来源:igfitidea点击:

Using Roboto thin or condensed

androidandroid-fonts

提问by lujop

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

是否可以在 ICS 中使用Roboto Thin 或 condensed 样式而不必包含 .ttf 并手动加载它,我的意思是使用:

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

回答by David

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

早于 4.1 的 Android 版本仅包含四种基本的 Roboto 样式:Regular、BoldItalicBoldItalic。在没有资产的情况下,无法在 ICS 中使用精简或压缩样式。

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

Android 4.1 ( JellyBean, API16) 及更高版本包含更多 Roboto 样式

  • Regular
  • Italic
  • Bold
  • Bold-italic
  • Light
  • Light-italic
  • Condensed regular
  • Condensed italic
  • Condensed bold
  • Condensed bold-italic
  • 常规的
  • 斜体
  • 胆大
  • 加粗斜体
  • 浅斜体
  • 浓缩正则
  • 浓缩斜体
  • 浓缩粗体
  • 浓缩粗斜体