cppreference2mshelp icon indicating copy to clipboard operation
cppreference2mshelp copied to clipboard

发布 html 包的 monospace 字体好像是 Windows 的 Courier New, 怎么恢复为原来的字体?

Open epheien opened this issue 1 year ago • 4 comments

我在macOS下打开 https://zh.cppreference.com/w/%E9%A6%96%E9%A1%B5 看到的字体如下图 Xnip2024-10-06_19-23-09

但是在下载的 html 的字体就变成如下了 Xnip2024-10-06_19-23-47

epheien avatar Oct 06 '24 11:10 epheien

Upstream issue, upstream preprocess script has changed the site_modules.css file with older font names, so the font is different with the website. Get a manually modified css from site_modules.zip, and replace the file in reference\common dir, and is should be ok. 上游问题,上游预处理脚本使用旧字体名称更改了 site_modules.css 文件,因此字体与网站不同。 从 site_modules.zip 获取手动修改过的 css 文件,替换掉 reference\common 目录中的文件,应该就没问题了。

myfreeer avatar Oct 07 '24 09:10 myfreeer

Upstream issue, upstream preprocess script has changed the site_modules.css file with older font names, so the font is different with the website. Get a manually modified css from site_modules.zip, and replace the file in reference\common dir, and is should be ok. 上游问题,上游预处理脚本使用旧字体名称更改了 site_modules.css 文件,因此字体与网站不同。 从 site_modules.zip 获取手动修改过的 css 文件,替换掉 reference\common 目录中的文件,应该就没问题了。

用这个方法确实可以修复, 这个修正方案能合并到主线吗?

epheien avatar Oct 07 '24 09:10 epheien

用这个方法确实可以修复, 这个修正方案能合并到主线吗?

I've proposed a pull request here, and if not merged or fixed elsewhere upstream before my next release, I'll make a patch here. 我已经提出了一个拉取请求 这里,如果在下一个版本发布前没有在上游其他地方合并或修复,我将在这里打一个补丁。

myfreeer avatar Oct 07 '24 09:10 myfreeer

最终验证了, 如果不使用上面修改过的 css, macOS 下载安装 Dejavu Sans Mono 字体, 就可以让等宽字体用这个字体显示

epheien avatar Oct 25 '24 10:10 epheien