从API 16开始,Jellybean Roboto作为可用的字体系列推出.在这里看看Android 16中的"新" .
指定android:fontFamily="sans-serif"一个(在的Roboto API 16+)TextView默认fontFamily的TextView?
是
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
Run Code Online (Sandbox Code Playgroud)
相当于
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="sans-serif" />
Run Code Online (Sandbox Code Playgroud)
?
"Roboto和Noto是Android和Chrome上的标准字体."
来自Wiki,
"Roboto是一款由Google开发的无衬线字体系列,作为其移动操作系统Android的系统字体."
我没有在文档中看到fontFamilyAndroid 的默认设置.见参考文献:
对于基于Material UI(React)并使用Webpack构建的渐进式 Web应用程序,如何正确包含Roboto字体,以便应用程序不依赖于Google服务器,并且字体也可以脱机工作?
关于Roboto字体存在类似的Material UI问题,但仍依赖于Google提供的字体文件.
我发现了一个提供Roboto字体文件的NPM包,但是我不知道如何提供这些文件,因为提供了很多样式和字体格式,我不知道Material UI真正需要什么样的样式.此外,仅通过@import导入这些字体系列似乎存在性能问题.
那么,将正确的 Roboto文件与我的应用程序捆绑在一起的优秀而简单的解决方案是什么?
我现在经常听到:"Roboto是默认的字体类型".但是如何使用此默认字体类型?我的具体含义是,在我以前下载资产等的过去,我曾经必须指定类似的东西
<item name="typeface">roboto_bold</item>
Run Code Online (Sandbox Code Playgroud)
想象一下,我有兴趣使用所有的说法(反过来)
roboto_thin
roboto_thin_italic
roboto_light
roboto_light_italic
roboto_regular
roboto_italic
roboto_medium
roboto_medium_italic
roboto_bold
roboto_bold_italic
roboto_black
roboto_black_italic
roboto_condensed_light
roboto_condensed_light_italic
roboto_condensed_regular
roboto_condensed_italic
roboto_condensed_bold
roboto_condensed_bold_italic
roboto_slab_thin
roboto_slab_light
roboto_slab_regular
roboto_slab_bold
Run Code Online (Sandbox Code Playgroud)
如何在我的xml布局文件或style.xml文件中指定它们?
我一直在为一个客户端网站工作,我有渲染Roboto字体的问题.
在Chrome(版本43.0.2357.65米)中,Roboto的各种重量看起来都相同.下面是一个示例:左边是Mozilla Firefox,右边是Chrome http://i.stack.imgur.com/dX4Lx.jpg
你知道它有什么问题吗?
谢谢
我有一个使用VUE CLI 3.x创建的Vue / Vuetify应用程序正在开发中,并且想在本地提供Roboto字体,而不是通过Google cdn。
有人通过webpack和vue cli生成的vuetify应用项目完成了此任务吗?
我在我的反应本机应用程序中对文本进行了一些更改:我需要为段落指定Roboto灯,为标题指定Roboto Bold.我需要在iOS和Android应用程序中具有相同的文本外观:所以我需要使它适用于我尝试此代码行代码
text : {
fontFamily: 'sans-serif-light'
},
我从官方文档中尝试了这种类型,它工作正常
title : {
fontFamily: 'Cochin'
},
- >所以我认为问题出在Roboto fontfamily本身..任何帮助?
我按照google/roboto存储库中的说明进行操作,但没有任何OTF文件可用作webfont.
我能得到的唯一反馈是Chrome说无法解码下载的字体.
OTS说一切都很好.
为什么这样,我如何在网络上使用Roboto opentype功能?
仅供参考我也开了google/roboto#283
以下是生成的字体之一:https://drive.google.com/open?id = 157_ -UBTyswylqY3DOK-mKihd7Vk-vFA_
如您在屏幕截图中看到的,图标和字体未正确加载。
我们的观察是,这仅在Safari中不起作用。无论我们是在iPhone还是Mac上进行测试。
字体加载如下:
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
Run Code Online (Sandbox Code Playgroud)
我们测试过的任何其他浏览器都可以正确显示图标和字体。(iOS上的Google浏览器; Windows上的Chrome)
从我们在Safari调试器中看到的看来,字体文件无法下载。(我不想写这个,但是:有时我观察到它工作了很短的时间,然后停止工作。)
在Chrome中,结果如下所示:
有什么建议?
更新2019-11-13:在以下位置找到了更多信息:https : //github.com/doanythingfordethklok/safari-cache-bug
在这里拉我的头发。
我是 React 新手,我的 css 中有我的字体系列,如下所示。在本地主机上一切都很好,但是当我部署时,Roboto 字体在 safari 或移动浏览器上不起作用......
任何帮助将不胜感激
谢谢
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: Roboto, sans-serif !important;
border: none;
}
Run Code Online (Sandbox Code Playgroud)
我也正在使用样式组件,我不太确定这是否与它有关。
我想使用谷歌Roboto字体,但它在IE11/Edge中看起来非常难看.这是我的示例代码:
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<link href='http://fonts.googleapis.com/css?family=Roboto:300' rel='stylesheet' type='text/css'>
<title></title>
</head>
<body>
<div style="font-family: 'Roboto'">
közötti m?veleteire.
</div>
Run Code Online (Sandbox Code Playgroud)
上部文本显示在IE/Edge中,较低的是Chrome版本.(字母ű非常难看)如何在IE中正确使用Roboto?
我有几种谷歌字体,我使用 @import 规则导入到样式表中。除了 Roboto Condensed 之外,所有这些都渲染得很好。它会恢复为默认的无衬线字体,在我的例子中是 Helvetica。
@import url(https://fonts.googleapis.com/css?family=Roboto+Condensed:400&subset=latin,latin-ext);
font-family: 'Roboto Condensed', sans-serif;
font-style: normal;
font-weight: 400;
Run Code Online (Sandbox Code Playgroud)
我已经尝试删除本地 Roboto 字体、更改字体粗细和字体样式、使用字体系列名称,但开发工具仍然显示渲染的字体是 Helvetica。其他谷歌字体渲染得很好。可能有什么问题?
roboto ×12
css ×6
fonts ×6
html ×3
android ×2
font-family ×2
webfonts ×2
webpack ×2
firefox ×1
material-ui ×1
netlify ×1
opentype ×1
react-native ×1
reactjs ×1
rendering ×1
safari ×1
text ×1
vue.js ×1
vuetify.js ×1
web ×1