Hubot Sans GitHub 开源的无衬线字体

软件简介

Hubot Sans 是 GitHub 开源的无衬线字体,是 Mona Sans 的机器人伙伴。该字体的设计具有更多的几何特征,给人以技术性和特异性的感觉,非常适合于标题引语。

Hubot Sans GitHub 开源的无衬线字体

Hubot Sans 是一种可变字体。可变字体可以将一个字体的不同变化纳入一个单一的文件中,并得到所有主要浏览器的支持,从而实现性能优势和对字体粗细、宽度和倾斜度的精细设计控制。

Hubot Sans GitHub 开源的无衬线字体

用法

对于 Web,建议使用 Hubot-Sans.woff2。 用 @font-face 规则定义字体,设置它的字重和拉伸范围,然后使用它。

@font-face {
  font-family: 'Hubot Sans';
  src:
    url('Hubot-Sans.woff2') format('woff2 supports variations'),
    url('Hubot-Sans.woff2') format('woff2-variations');
  font-weight: 200 900;
  font-stretch: 75% 125%;
}
html {
  font-family: 'Hubot Sans';
}

为了减少 CLS,你可以在文档的 head 预载字体。

<link rel="preload" href="Hubot-Sans.woff2" as="font" type="font/woff2" crossorigin>

https://gitee.com/mirrors/hubot-sans

版权声明:admin 发表于 2023-07-08 20:29:16。
转载请注明:Hubot Sans GitHub 开源的无衬线字体 | 天马行空导航

暂无评论

暂无评论...