在 gnome-terminal 中使用已安装的字体

Mob*_*obo 11 fonts gnome-terminal

最近我一直在搞 gnome-terminal 让它看起来更吸引人。我尝试使用 ~/.fonts 文件夹中的已安装字体(与字体查看器一起安装),但是当我编辑 gnome-terminal 配置文件时,已安装的字体没有显示。

我尝试使用的字体是 cur.se.ttf,并且所有其他允许字体更改的程序都可以工作,并且可以全局安装。

我是不是安装错了,还是有他们需要的地方?

小智 6

配置 GUI 似乎会过滤非等宽字体

解决方法是直接使用dconf设置字体:

# get your profile id
dconf list '/org/gnome/terminal/legacy/profiles:/'
# get your current font
dconf read '/org/gnome/terminal/legacy/profiles:/:PROFILE_ID/font'
# set the font, make sure you include those single quotes
dconf write '/org/gnome/terminal/legacy/profiles:/:PROFILE_ID/font' "'FreeMono 18'"
Run Code Online (Sandbox Code Playgroud)


小智 5

对我有用的是将字体文件放入~/.local/share/fonts然后运行,

$ sudo fc-cache -vf ~/.local/share/fonts
Run Code Online (Sandbox Code Playgroud)

中的字体~/.local/share/fonts现在可用于所有应用程序。


小智 -1

更新字体缓存可能会解决该问题。尝试运行以下命令:

fc-cache -vf ~/.fonts
Run Code Online (Sandbox Code Playgroud)

  • 刚刚又做了一遍,还是不行。 (2认同)