查看已有字体
linux下的字体文件是保存在/usr/share/fonts/truetype/dejavu/
目录下的,使用如下命令查看
fc-list
结果如下:
/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold
/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMoBI.ttf: Bitstream Vera Sans Mono:style=Bold Oblique
/usr/share/fonts/truetype/liberation/LiberationSansNarrow-Italic.ttf: Liberation Sans Narrow:style=Italic
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraBI.ttf: Bitstream Vera Sans:style=Bold Oblique
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraBd.ttf: Bitstream Vera Sans:style=Bold
/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf: Liberation Sans:style=Regular
/usr/share/fonts/truetype/liberation/LiberationMono-BoldItalic.ttf: Liberation Mono:style=Bold Italic
/usr/share/fonts/truetype/liberation/LiberationSerif-Italic.ttf: Liberation Serif:style=Italic
/usr/share/fonts/truetype/liberation/LiberationMono-Bold.ttf: Liberation Mono:style=Bold
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraSe.ttf: Bitstream Vera Serif:style=Roman
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMoBd.ttf: Bitstream Vera Sans Mono:style=Bold
/usr/share/fonts/truetype/liberation/LiberationSansNarrow-Regular.ttf: Liberation Sans Narrow:style=Regular
/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold
/usr/share/fonts/truetype/liberation/LiberationSerif-Bold.ttf: Liberation Serif:style=Bold
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraSeBd.ttf: Bitstream Vera Serif:style=Bold
/usr/share/fonts/truetype/liberation/LiberationMono-Regular.ttf: Liberation Mono:style=Regular
/usr/share/fonts/truetype/liberation/LiberationSans-Italic.ttf: Liberation Sans:style=Italic
/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf: Bitstream Vera Sans:style=Roman
/usr/share/fonts/truetype/liberation/LiberationSerif-BoldItalic.ttf: Liberation Serif:style=Bold Italic
/usr/share/fonts/truetype/liberation/LiberationSansNarrow-BoldItalic.ttf: Liberation Sans Narrow:style=Bold Italic
/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold
/usr/share/fonts/truetype/liberation/LiberationMono-Italic.ttf: Liberation Mono:style=Italic
/usr/share/fonts/truetype/liberation/LiberationSans-BoldItalic.ttf: Liberation Sans:style=Bold Italic
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMono.ttf: Bitstream Vera Sans Mono:style=Roman
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraIt.ttf: Bitstream Vera Sans:style=Oblique
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMoIt.ttf: Bitstream Vera Sans Mono:style=Oblique
/usr/share/fonts/truetype/liberation/LiberationSerif-Regular.ttf: Liberation Serif:style=Regular
/usr/share/fonts/truetype/liberation/LiberationSansNarrow-Bold.ttf: Liberation Sans Narrow:style=Bold
/usr/share/fonts/truetype/liberation/LiberationSans-Bold.ttf: Liberation Sans:style=Bold
/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf: DejaVu Serif:style=Book
可以发现,连最常用的字体都没有
安装其他字体
在Linux下安装其他字体,可以按照以下步骤操作:
- 首先,确保您已经安装了字体支持。在大多数Linux发行版中,字体通常已经预先安装。例如,在Ubuntu和Debian系统上,可以使用以下命令安装字体:
sudo apt-get install fonts-freefont-ttf
- 然后,从其他来源下载字体文件。可以从以下网址下载字体:
-
将下载的字体文件保存到您的系统字体目录中。在大多数Linux发行版中,字体目录通常位于
/usr/share/fonts
。 -
更新字体缓存。运行以下命令来更新字体缓存:
fc-cache -fv
- 现在,字体文件会被保存到
/usr/share/fonts/truetype/dejavu/
目录中,继续使用fc-list
命令查看即可。
评论区