Debian系统安装中文字体

编程入门 行业动态 更新时间:2024-10-28 09:28:48

1.查看debian的发行版本信息

cat /etc/os-release

2.更换apt-get的源:

修改源配置:

vim /etc/apt/sources.list

根据debian的版本在配置中加入合适的阿里源(也可选择其他源):

deb http://mirrors.ustc.edu/debian buster main contrib non-free

deb http://mirrors.ustc.edu/debian buster-backports main contrib non-free

deb http://mirrors.ustc.edu/debian buster-proposed-updates main contrib non-free

deb http://mirrors.ustc.edu/debian-security buster/updates main contrib non-free

退出后更新源:

apt-get clean

apt-get update

apt-get upgrade

3.安装字体:

apt-get install ttf-mscorefonts-installer

apt-get install fontconfig

4.在/usr/share/fonts/truetype/目录下新建文件夹myfonts,将*.ttf文件复制到此文件夹下,并修改字体文件的权限:

chmod 777 *.ttf

5.建立字体缓存

mkfontscale

mkfontdir

fc-cache -fv

fc-list

6.添加中文支持

安装locale:

apt-get install locales

配置:

dpkg-reconfigure locales

选择以下编码并将zh_CN UTF-8 UTF-8设置为默认编码:

en_US ISO-8859-1

en_US.UTF8 UTF-8

zh_CN GB2312

zh_CN.GB18030 GB18030

zh_CN GBK GBK

zh_CN UTF-8 UTF-8

7.安装中文字库

apt-get install ttf-wqy-zenhei

8.重启系统

更多推荐

Debian系统安装中文字体

本文发布于:2023-06-11 02:05:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1370973.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:系统安装   中文字体   Debian

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!