-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
无法设置中文 #14
Comments
不用设置中文,直接参考arch官方文档安装中文字体,就能显示中文了 |
那能让终端输出中文吗 |
把
这部分删除,然后执行
|
执行locale -a仍然没有zh_CN.UTF-8 |
我是自己安装的 arch,没有用这个软件里的包,根据我的经验,不用设置 locale,如果要设置的话,大多数情况使用 C.UTF-8 就够了,除非有些软件依赖于特定 LANG 或者 LC 设置的话。可以自己在 bashrc 或者其他 shell 的环境中配置如下内容: # $HOME/.bashrc or $HOME/.zshrc etc...
export LANG="C.UTF-8"
export LC_CTYPE="C.UTF-8"
export LC_ALL="C.UTF-8"
# ... other LC export 至于中文的显示主要还是字体,可以参考一下这两篇文档,简体中文本地化 和 字体设置。 这里捡重点说,你首先需要安装至少一个支持中文的字体,比如: sudo pacman -S noto-fonts 然后在 mkdir -p $HOME/.fonts.config.d
touch $HOME/.fonts.config.d/50-user.conf 用你擅长的文本编辑器修改配置文件,添加默认字体配置。以下是一个示例: <?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="family">
<string>system-ui</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Cascadia Mono</string>
<string>Noto Sans Mono</string>
</edit>
</match>
<!-- Default sans-serif fonts-->
<match target="pattern">
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Cascadia Mono</string>
<string>Noto Sans Mono</string>
</edit>
</match>
<!-- Default serif fonts-->
<match target="pattern">
<test name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Cascadia Mono</string>
<string>Noto Sans Mono</string>
</edit>
</match>
<!-- Default monospace fonts-->
<match target="pattern">
<test name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Cascadia Mono</string>
<string>Noto Sans Mono</string>
</edit>
</match>
</fontconfig> 这里的配置文件会覆盖 |
The text was updated successfully, but these errors were encountered: