Ubuntu添加和设置默认中文字体

本文介绍了在Ubuntu系统中查看已安装中文字体的方法,通过`fc-list:lang=zh`命令。并详细讲解如何从Windows复制微软雅黑字体到Ubuntu,处理ttc文件使其变为ttf以便系统识别。安装完成后,可以通过双击字体文件并点击Install来安装。最后,修改配置文件`/etc/fonts/conf.d/64-language-selector-prefer.conf`,在`<prefer>`标签后添加新字体设置,重启系统后即可将默认字体更改为微软雅黑。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

参考:https://blog.csdn.net/gengyuchao/article/details/101215243

首先,通过命令

$ fc-list :lang=zh

可以查看已安装的中文字体,默认为Ubuntu系统自带的中文字体。
安装新字体的方法为把字体文件(如微软雅黑)拷贝到Ubuntu系统,如果网络上不好找的话也可以从Windows系统复制,Windows系统存放字体的目录为

C:\Windows\Fonts

里面找到微软雅黑字体文件,复制到Ubuntu系统,如果字体后缀名是ttc,把后缀名ttc改为ttf,使Ubuntu系统能够识别。
在这里插入图片描述
然后双击字体文件,打开字体文件窗口,如下
在这里插入图片描述
点击右上方的Install,过一会字体就会安装完成。字体的名称为窗口显示的Microsoft YaHei。这时再用fc-list命令查看就能看到安装的微软雅黑字体了。

设置默认中文字体的方法,通过配置文件进行,配置文件为

/etc/fonts/conf.d/64-language-selector-prefer.conf

修改文件,在文件中每一个<prefer>后面第一行添加新的字体设置行

<family>Microsoft YaHei</family>

如下
在这里插入图片描述
重启系统之后,系统默认字体就更改为微软雅黑字体了。

The Docker overlay network driver is designed to provide a scalable and flexible networking solution for Docker containers running on multiple hosts. The overlay network driver allows Docker containers to communicate with each other seamlessly, regardless of the host they are running on. When using the overlay network driver, Docker logs are also handled differently than with other drivers. Docker logs from containers running on an overlay network are not automatically sent to the host's syslog daemon, as they are with the default bridge network driver. Instead, Docker logs are sent directly to the Docker daemon on the host where the container is running. To view Docker logs for containers running on an overlay network, you can use the `docker logs` command followed by the container ID or name. For example, to view the logs for a container named `my-container` running on an overlay network named `my-overlay-network`, you would use the following command: ``` docker logs my-container ``` If you want to view the logs for a container running on a specific host in an overlay network, you can use the `docker logs` command with the `--tail` and `--follow` options, followed by the container ID or name and the hostname. For example, to view the logs for a container named `my-container` running on a host named `my-host` in an overlay network named `my-overlay-network`, you would use the following command: ``` docker logs --tail 100 --follow my-container@my-host ``` This command will display the last 100 lines of logs for the container and continue to follow new logs as they are generated.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值