惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
Hacker News: Ask HN
Hacker News: Ask HN
Know Your Adversary
Know Your Adversary
C
Cisco Blogs
T
The Exploit Database - CXSecurity.com
T
Threat Research - Cisco Blogs
Scott Helme
Scott Helme
T
Tor Project blog
T
Tenable Blog
P
Privacy & Cybersecurity Law Blog
C
Cybersecurity and Infrastructure Security Agency CISA
S
Securelist
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
腾讯CDC
L
LangChain Blog
IT之家
IT之家
Recent Commits to openclaw:main
Recent Commits to openclaw:main
月光博客
月光博客
N
News and Events Feed by Topic
GbyAI
GbyAI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
Tailwind CSS Blog
Jina AI
Jina AI
S
Security Affairs
T
The Blog of Author Tim Ferriss
博客园 - Franky
H
Hacker News: Front Page
Martin Fowler
Martin Fowler
D
DataBreaches.Net
酷 壳 – CoolShell
酷 壳 – CoolShell
Webroot Blog
Webroot Blog
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
U
Unit 42
S
Schneier on Security
B
Blog
Schneier on Security
Schneier on Security
Latest news
Latest news
TaoSecurity Blog
TaoSecurity Blog
Google DeepMind News
Google DeepMind News
The Register - Security
The Register - Security
Recorded Future
Recorded Future
O
OpenAI News
雷峰网
雷峰网
H
Heimdal Security Blog

Mycpen

13_Hexo-操作记录 12_Hexo-GitHub Actions 发布博客静态资源至 NPM 06_转载-自我提升的8个好习惯 05_转载-延寿指南-反向面试-文档写作规范 04_转载-提问的智慧 03_转载-中文文案排版指北 11_Hexo-GitHub Actions 自动部署博客 10_Hexo-GitHub Actions 自动刷新多吉云 CDN 缓存 08_Other-GitHub Actions 定时执行脚本,备份又拍云云存储 07_Other-文章记录-sshpass 03_Error-问题记录-winpty-.gitignore 02_转载-Replit 部署 Memos & Butterfly 基于 Memos 实现清单功能 09_Hexo-Replit 搭建 Uptime Kuma 监控服务 07_Hexo-插件整理 06_Other-Windows 图片批量压缩工具 ultra-tinypng 01_转载-图床搭建 Backblaze B2 + Cloudflare CDN 05_Other-使用 Python open 函数批量替换文件内容 04_Other-使用 Python ftplib 模块同步又拍云云存储数据至本地 03_Other-PC端环境记录
08_Hexo-博客引用 B站鸿蒙字体
Mycpen · 2022-12-06 · via Mycpen

2022/12/31 更新

butterfly.zhheo.com 上看到下面这篇文章,介绍了很多其他字体(包括本文B站鸿蒙字体),写的很好

免费引入**黑体字体系列整理及 CSS 字体

1. 前言

Eurkon 那发现了B站使用的 harmonyOS_Regular 字体,B站网页端 打开开发者工具能看到字体由 regular.css 引入

计划用一段时间该字体,如有明显限速再停止使用

2. 引用步骤

  1. 自定义css 引入 regular.css 内容

  2. 自定义css 追加使用该字体的 css,以我的站点为示例(Butterfly 主题可跳过,直接步骤 3

    1
    2
    3
    4

    body {
    font-family: HarmonyOS_Regular,-apple-system,BlinkMacSystemFont,'Segoe UI','Helvetica Neue',Lato,Roboto,'PingFang SC','Microsoft YaHei',sans-serif;
    }
  3. Butterfly 主题内置了自定义字体的配置,参见 官方文档_自定义字体和字体大小

    示例:修改主题配置文件,如 [Blogroot]/_config.butterfly.yml

    1
    2
    3
    4
    5
    6
    7
    # Don't modify the following settings unless you know how they work (非必要不要修改)
    font:
    global-font-size:
    code-font-size:
    - font-family:
    + font-family: HarmonyOS_Regular,-apple-system,BlinkMacSystemFont,'Segoe UI','Helvetica Neue',Lato,Roboto,'PingFang SC','Microsoft YaHei',sans-serif
    code-font-family:

    个人建议:代码字体不建议使用 HarmonyOS_Regular,主题原生的 consolas 字体更好看

3. 后记

手机上唯二浏览器之一的 某浏览器 出现站内跳转时,页面长时间加载不出来的情况,考虑到 B站 对外站限速的可能性(排除法,大概率浏览器问题,同机的另一个浏览器不会复现🤔),备用方案:字体放 Github 个人仓库中,通过 staticaly CDN 进行免费加速使用

该字体已同步至 个人仓库

Fomalhaut🥝 获知 staticaly CDN 的使用,引用内容如下

原文地址:https://www.fomal.cc/

官网地址:https://www.staticaly.com
轻松地从GitHub / GitLab / Bitbucket等加载您的项目 没有流量限制或限制。

文件通过超快速全球CDN提供。 在URL(不是分支)中使用特定标记或提交哈希。
根据URL永久缓存文件。 除master分支外,文件在浏览器中缓存1年。 具体用法:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# GitHub CDN
https://cdn.staticaly.com/gh/:user/:repo/:tag/:file
https://cdn.staticaly.com/gh/growvv/growvv.github.io/master/README.md

# GitLab CDN
https://cdn.staticaly.com/gl/:user/:repo/:tag/:file

# Bitbucket CDN
https://cdn.staticaly.com/bb/:user/:repo/:tag/:file

# WordPress CDN
https://cdn.staticaly.com/wp/c/:version/wp-includes/:file
https://cdn.staticaly.com/wp/p/:plugin_name/:version/:file
https://cdn.staticaly.com/wp/t/:theme_name/:version/:file

# Imgpx CDN
https://cdn.staticaly.com/img/:image_url

# Favicons CDN
https://cdn.staticaly.com/favicons/:favicon_url

总结:staticaly CDN 作为免费 CDN,速度勉强还行

4. 字体样式总结

相较于 Butterfly 主题原字体,harmonyOS_Regular 字体左右间距略变大,字母略变明显,汉字略细密

总结:感知不强,徒增功耗 😂

主题原字体(Segoe UI)

harmonyOS_Regular 字体

版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议,转载请注明来自 Mycpen


欢迎访问 MYCPEN BLOG

建站初衷 记录学习历程,整理平时发现并解决的问题