起因是升级了 KB5053656 之后,发现 GitHub 上的中文字体变得怪怪的,仔细一看这不是 Noto Sans SC 吗?
看了一下 font-family 是 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",为什么 Segoe UI 没起作用?
Segoe UI 的 FontLink 配置为:
MSYH.TTC,Microsoft YaHei UI,128,96
MSYH.TTC,Microsoft YaHei UI
TAHOMA.TTF,Tahoma
MSJH.TTC,Microsoft Jhenghei UI,128,96
MSJH.TTC,Microsoft Jhenghei UI
MEIRYO.TTC,Meiryo UI,128,96
MEIRYO.TTC,Meiryo UI
SIMSUN.TTC,SimSun
MINGLIU.TTC,PMingLiU
MSGOTHIC.TTC,MS UI Gothic
MALGUN.TTF,Malgun Gothic,128,96
MALGUN.TTF,Malgun Gothic
GULIM.TTC,Gulim
YUGOTHM.TTC,Yu Gothic UI,128,96
YUGOTHM.TTC,Yu Gothic UI
SEGUISYM.TTF,Segoe UI Symbol
写了一个测试:
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>测试 Segoe UI 字体</title>
<style>
body {
font-family: "Segoe UI";
font-size: 24px;
text-align: center;
margin-top: 50px;
}
</style>
</head>
<body>
<h1>测试字体</h1>
</body>
</html>
发现实际渲染用的是 Noto Sans SC ,卸载更新以后就可以用微软雅黑渲染了。
我的系统语言是英文,但感觉和这个应该关系不大。有没有安装了 KB5053656 的朋友发现字体出问题了?