如何获取字体的真实名称?

Uni*_*mor 5 fonts x11

在我的.spacemacs我尝试更改我的默认字体但它绘制错误,如何找到可以在配置文件中写入的字体名称?

jco*_*ens 14

检查fc-list命令的输出(在终端窗口中):

/usr/share/fonts/TTF/LiberationMono-Italic.ttf: Liberation Mono:style=Italic
/usr/share/fonts/TTF/VeraMono.ttf: Bitstream Vera Sans Mono:style=Roman
/usr/share/fonts/TTF/DejaVuSansMono-Oblique.ttf: DejaVu Sans Mono:style=Oblique
/usr/share/fonts/OTF/LinLibertine_M.otf: Linux Libertine Mono O:style=Mono

/usr/share/fonts/OTF/LinLibertine_M.otf: Linux Libertine Mono O:style=Mono
Run Code Online (Sandbox Code Playgroud)

例如:

/usr/share/fonts/OTF/LinLibertine_M.otf       File name
:                                             Separator
Linux Libertine Mono O                        Font name (note, remove the initial space)
:                                             Separator
style=Oblique                                 The font 'style'
Run Code Online (Sandbox Code Playgroud)

字体样式通常是Regular(or Normal), Italic(or Oblique), Monospace(or Mono), 中的一种Book,并且它们的组合是有效的。

中间值(“字体名称”)通常是您要使用的名称。如果它包含空格,您可能需要对每个空格进行转义(前面有一个 '\')或将整个名称放在引号 ('"') 中。虽然并不总是必要的。

请注意,某些字体名称包含扩展字符(例如 TM 或版权符号),因此您可能需要处理这些字符。(它们可以显示为,例如â¢fc-list输出中)

字体管理器等软件也会显示这些名称。

  • 如果名字中有逗号怎么办?例如:`ƦB.ttf: TTEditFont,花鸟风月B:style=Regular` (3认同)