草庐IT

Roboto-Regular

全部标签

android - 如何在 Eclipse API 16 (fontFamily) 中使用 native Android OS 4.1 Roboto 字体

在4.1jellybean中,Robot开始出现在整个系统UI中。我想在Eclipse中使用新属性“fontFamily”,如本页的FontFamilies部分所述:http://developer.android.com/about/versions/android-4.1.html#UI目标是在所有支持它的设备上使用Roboto(不将其包含在/assets中),并让字体在所有非4.0+设备上优雅地降级为Droidsans。同样,我不想在我的.apk中包含,明白这很容易做到。希望看到示例代码或有关成功使用fontFamily与API16的反馈。 最佳答案

android - roboto-android 和 roboto-unhinted 之间有什么区别?

我正在开发一个需要使用Roboto字体来呈现UI的Android应用。根据https://github.com/google/roboto/releases,Roboto字体一共有三种:Google说:HintedfontsHintsaretheinstructionsembeddedinafontonhowtomodify(distort)aglyphtolookbetteronlow-resolutiondisplays.Asatradeoff,ahintedfontconsumesmorespacethantheunhintedversion.BothRobotoandNotoh

android - 如何在 TextView 中使用 Roboto 字体?

如何为我的TextView使用roboto字体类型?我想从xml来做,我的应用程序支持上面的4.1。下面是我试过的东西:normalsans-serif14sp@color/bubble_text_color 最佳答案 Roboto已经是默认字体类型(从Android4.0开始)见http://developer.android.com/design/style/typography.html否则您必须以编程方式设置字体。所以我建议你写一个类:publicclassStyledTextViewextendsTextView{publ

android - 我如何在 TextView 中使用 Roboto Black 字体

我正在尝试通过XML在TextView上应用RobotoBlack字体,但它似乎不起作用。当我看那个网站时http://developer.android.com/design/style/typography.html看起来应该可以访问RobotoBlack字体,但实际上我找不到将其应用到我的TextView的方法。我唯一能做的就是获得robotoregular的大胆版本。那里有人尝试过类似的东西并且可以帮助我吗? 最佳答案 你为什么不直接在你的java文件中设置它,就像添加这段代码并从你的Assets运行它一样简单。Button

android - 当我使用 Roboto-Italic.ttf 字体时,为什么 TextView.setTypeface() 夸大地增加了我的 TextView 高度?

我正在尝试在TextView上设置RobotoLight字体。我从here下载了Roboto字体.我从我的代码中所做的就是:sRobotoItalic=Typeface.createFromAsset(getContext().getAssets(),"fonts/Roboto_v1.2/Roboto-Italic.ttf");finalTextViewtextView=(TextView)view.findViewById(R.id.text_view);textView.setTypeface(sRobotoItalic);我的TextView的高度几乎是实际文本高度的5倍。我确信

android - Material 设计 : how to get button text to be regular case (not CAPITAL)?

AndroidMaterialDesign按钮样式将按钮文本设为“大写”字母。我怎样才能取回我通过string.xml提供的任何大小写(非大写,大写)的文本?字符串.xmlAddItem 最佳答案 添加:android:textAllCaps="false" 关于android-Material设计:howtogetbuttontexttoberegularcase(notCAPITAL)?,我们在StackOverflow上找到一个类似的问题: https:

android - 如何在 ICS+ 中使用 Roboto 压缩(或细)字体?

我找不到将Roboto设置为压缩(瘦)而不是默认设置的方法。可能吗? 最佳答案 下载完整Roboto家庭将Roboto-Condensed.ttf复制到项目的assets文件夹中在代码中,使用TypefacerobotoCond=Typeface.createFromAsset(context.getAssets(),"Roboto-Condensed.ttf")获取对您的Typeface的引用>在任何小部件中使用它,例如textView.setTypeface(robotoCond);???利润!

android - Roboto 字体中包含哪些字形或字符集?

我想在我的Android应用程序中使用一些不太常见的变音符号,也许还有一些奇特的Unicode字符,但我找不到Roboto的字符映射。RobotoRegular、Bold和Condensed字体中包含哪些字形或字符集? 最佳答案 经过更多搜索,我在GoogleAPI的网站上找到了这个引用http://commondatastorage.googleapis.com/androiddevelopers/design/Roboto_Specimen_Book_20131031.pdf最新版本字体文件的更新引用在这里https://git

android - 有了 Android 兼容包,为什么要使用 "regular" fragment ?

据我所知,Android兼容包fragment与“常规”蜂窝fragment具有相同的功能。一方面,您拥有适用于1.6到4.0设备的Fragment。另一方面,您的Fragment仅适用于3.1到4.0的设备。Google显然计划在一段时间内维护兼容包。让我选择“常规”而不是ACP的原因是什么?我能找到的唯一原因是尺寸。ACPjar是220ko,但在我看来并没有那么多。这是速度的问题吗?还有什么我想不到的? 最佳答案 FromwhatIhavereadandheard,theAndroidCompatibilityPackageFr

Android "Roboto Light"像素化

我在我的应用程序中包含了Roboto系列字体,并在代码中创建字体,如下所示:TypefacerobotoLight=Typeface.createFromAsset(getAssets(),"fonts/Roboto-Light.ttf");我注意到某些较小的尺寸(甚至是AndroidDeveloperTypographypage中建议的尺寸)出现扭曲或像素化。这是应用程序中一些TextView的屏幕截图:“UpcomingDates”使用更大的尺寸并且看起来不错。其他的尺寸为14sp,看起来很糟糕。问题不在于TextView中的边距或填充——我已经尝试更改两者。有谁知道导致此问题的原