如何增加Debian的字体?

Debian-Like

1 前言

一个问题,一篇文章,一出故事。
笔者希望安装Windows的字体库到Debian中使用,于是整理此文。

2 最佳实践

2.1 安装字体相关包

apt install -y fontconfig

2.2 确认字体配置目录

grep "/usr/share/fonts" /etc/fonts/fonts.conf

确保包含如下配置,

<dir>/usr/share/fonts</dir>

2.3 上传字体

mkdir -p /usr/share/fonts/windows
cp *.{ttf,TTF} /usr/share/fonts/windows
chown root:root /usr/share/fonts/windows/*.{ttf,TTF}
chmod 755 /usr/share/fonts/windows

2.4 刷新系统字体缓存

fc-cache -f -v

参阅文档
=====================
https://manpages.debian.org/testing/fontconfig-config/fonts-conf.5.en.html

https://manpages.debian.org/testing/fontconfig/fc-cache.1.en.html

没有评论

发表回复

Debian-Like
如何测试硬盘是否有环道?

1 前言 一个问题,一篇文章,一出故事。 笔者最近购入了一批二手的硬盘,由于需要确定硬盘是否有坏道, …

Debian-Like
如何安装Ubuntu的日志服务?

1 前言 一个问题,一篇文章,一出故事。 笔者今天发现Ubuntu默认找不到系统日志,需要额外安装, …

Debian-Like
如何Ubuntu编译安装openSSL?

1 基础知识 OpenSSL是一个开放源代码的软件库包,应用程序可以使用这个包来进行安全通信,避免窃 …