在 Archlinux 中安装微软字体可以解决诸多字体缺失和发虚问题

准备 PKGBUILD

Archlinux 中 AUR – ttf-ms-win10 提供了 PKGBUILD

1
git clone https://aur.archlinux.org/ttf-ms-win10.git

从 Windows 10 中复制字体文件

将 Windows/Fonts 中所有文件和 Windows/System32 中的 license.rtf 复制到 ttf-ms-win10 文件夹中

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Please note, that usage of Microsoft fonts outside running Windows
# system is prohibited by EULA (although in certain countries EULA is invalid).
# Please consult Microsoft license before using fonts.
#
# You can acquire fonts either from an installed and up-to-date Windows 10
# system or the most recent install medium.
#
# On the installed Windows 10 system fonts are usually located in
# C:\Windows\Fonts
# and license file is
# C:\Windows\System32\Licenses\neutral\_Default\Core\license.rtf
#
# How to acquire fonts from Windows 10 install medium:
#
# You can freely download the Windows 10 Enterprise 90-day evaluation from:
#
# http://www.microsoft.com/en-us/evalcenter/evaluate-windows-10-enterprise
#
# Fonts are located in 'sources/install.wim' file on the ISO, which
# is a 'Windows Imaging Format' (WIM) archive.
#
# You can extract WIM using wimextract ('wimlib' package) or 7z ('p7zip').
#
# Put the following script together with previously extracted
# 'install.wim' and execute:
#
# wimextract install.wim 1 /Windows/{Fonts/"*".{ttf,ttc},System32/Licenses/neutral/"*"/"*"/license.rtf} --dest-dir fonts
#
# Fonts and license will be located in the 'fonts' dir.
#
# You need all files listed in the _ttf_ms_win10[_*] arrays.Place them in the
# same directory as this PKGBUILD file, then run makepkg.


安装软件包

在 ttf-ms-win10 目录下,执行

1
2
3
4

makepkg --skipchecksums
makepkg --install

由于 Windows 10 内部版本不同,使用 –skipchecksums 跳过文件校验

刷新字体缓存

1
2
fc-cache
Bash

一些非常旧的应用可能需要执行以下命令(可能弃用)

1
2
mkfontscale
mkfontdir