Ano*_*non 12 command-line fonts
有没有办法从命令行检查您的 shell/终端仿真器正在使用哪种字体?
如果直接命令不可用,我愿意解决读取配置文件的一部分。
选项使用系统固定宽度字体通常等于并由 设置 org.gnome.desktop.interface
。
要获取当前字体设置,请运行以下命令:
gsettings get org.gnome.desktop.interface monospace-font-name
Run Code Online (Sandbox Code Playgroud)要设置/更改设置,请运行以下命令(此处为增加大小的示例):
gsettings set org.gnome.desktop.interface monospace-font-name 'Ubuntu Mono 14'
Run Code Online (Sandbox Code Playgroud)当我运行上面的命令时,我发现终端的字体发生了变化(增大了尺寸)!因此,gnome-terminal
使用该字体设置。
小智 8
获取系统首选等宽字体的与 DE 无关的方法:
$ fc-match Monospace
DejaVuSansMono.ttf: "DejaVu Sans Mono" "Book"
Run Code Online (Sandbox Code Playgroud)
参考:ArchWiki字体配置
您可以使用以下命令检查 gnome 终端字体
gconftool-2 --get /apps/gnome-terminal/profiles/Default/font
Run Code Online (Sandbox Code Playgroud)
例如,它在 gnome-terminal 中使用此命令
[guru@guru-pc:~]$gconftool-2 --get /apps/gnome-terminal/profiles/Default/font
Monospace 12
Run Code Online (Sandbox Code Playgroud)
如果您想使用命令行更改字体,可以使用以下命令
gconftool-2 --set /apps/gnome-terminal/profiles/Default/font --type string "courier new 12"
Run Code Online (Sandbox Code Playgroud)
其中 12 是字体大小。
归档时间: |
|
查看次数: |
34433 次 |
最近记录: |