必威体育Betway必威体育官网
当前位置:首页 > IT技术

如何给Linux安装新的字体

时间:2019-08-24 13:12:14来源:IT技术作者:seo实验室小编阅读:62次「手机版」
 

怎么安装字体

可能因为各种各样的原因,需要给linux安装我们自己所需要的字体,接下来写一下操作:

1、准备好字体,可以从网上下载,也可以直接从咱们的windows电脑中拷贝出来:

C:\Windows\Fonts 从这里拷贝windows上的字体;

2、上传到服务器上:

Linux字体目录是 /usr/share/fonts 我们在这个目录里面新建一个自己能够记住的目录,然后放入我们需要的字体;

[root@localhost ~]# cd /usr/share/fonts
[root@localhost fonts]# mkdir new
[root@localhost fonts]# ls
liberation  new
[root@localhost fonts]# cd new/
。。。。。。
然后将自己需要的字体传到这个目录下
。。。。。。

[root@localhost new]# ls
arialbd.ttf  ariali.ttf    ARIALNB.TTF  ARIALN.TTF  ariblk.ttf
arialbi.ttf  ARIALNBI.TTF  ARIALNI.TTF  arial.ttf   simfang.ttf
[root@localhost new]# 

3、加载这些字体:

如图所示就是成功的标志,可以从第三行信息看到加载到了咱们的10个ttf字体文件,以及最后一行的succeeded;

[root@localhost new]# fc-cache -fv
/usr/share/fonts: caching, new cache contents: 0 fonts, 2 dirs
/usr/share/fonts/liberation: caching, new cache contents: 4 fonts, 0 dirs
/usr/share/fonts/new: caching, new cache contents: 10 fonts, 0 dirs
/usr/share/X11/fonts/Type1: skipping, no such directory
/usr/share/X11/fonts/TTF: skipping, no such directory
/usr/local/share/fonts: skipping, no such directory
/root/.local/share/fonts: skipping, no such directory
/root/.fonts: skipping, no such directory
/usr/share/fonts: caching, new cache contents: 0 fonts, 2 dirs
/usr/share/X11/fonts/Type1: skipping, no such directory
/usr/share/X11/fonts/TTF: skipping, no such directory
/usr/local/share/fonts: skipping, no such directory
/root/.local/share/fonts: skipping, no such directory
/root/.fonts: skipping, no such directory
/var/cache/fontconfig: cleaning cache directory
/root/.cache/fontconfig: not cleaning non-existent cache directory
/root/.fontconfig: not cleaning non-existent cache directory
fc-cache: succeeded
[root@localhost new]# 

4、查看linux上面的全部字体;

[root@localhost new]# fc-list
/usr/share/fonts/new/simfang.ttf: 仿宋,FangSong:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/liberation/LiberationSans-Bold.ttf: Liberation Sans:style=Bold
/usr/share/fonts/new/arialbd.ttf: Arial:style=Bold,Negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,đậm,Lodia
/usr/share/fonts/liberation/LiberationSans-BoldItalic.ttf: Liberation Sans:style=Bold Italic
/usr/share/fonts/new/ARIALNBI.TTF: Arial,Arial Narrow:style=Narrow Bold Italic,Negreta cursiva,tučné kurzíva,fed kursiv,Fett Kursiv,Έντονα Πλάγια,Bold Italic,Negrita Cursiva,Lihavoitu Kursivoi,Gras Italique,Félkövér dőlt,Grassetto Corsivo,Vet Cursief,Halvfet Kursiv,Pogrubiona kursywa,Negrito Itálico,Полужирный Курсив,Tučná kurzíva,Fet Kursiv,Kalın İtalik,Krepko poševno,Lodi etzana
/usr/share/fonts/new/ARIALN.TTF: Arial,Arial Narrow:style=Narrow,Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/new/ariali.ttf: Arial:style=Italic,Cursiva,kurzíva,kursiv,Πλάγια,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,Poševno,nghiêng,Etzana
/usr/share/fonts/new/ariblk.ttf: Arial,Arial Black:style=Black,Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/new/arial.ttf: Arial:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,thường,Arrunta
/usr/share/fonts/new/ARIALNB.TTF: Arial,Arial Narrow:style=Narrow Bold,Negreta,tučné,fed,Fett,Έντονα,Bold,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia
/usr/share/fonts/liberation/LiberationSans-Italic.ttf: Liberation Sans:style=Italic
/usr/share/fonts/new/ARIALNI.TTF: Arial,Arial Narrow:style=Narrow Italic,Cursiva,kurzíva,kursiv,Πλάγια,Italic,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,Poševno,Etzana
/usr/share/fonts/new/arialbi.ttf: Arial:style=Bold Italic,Negreta cursiva,tučné kurzíva,fed kursiv,Fett Kursiv,Έντονα Πλάγια,Negrita Cursiva,Lihavoitu Kursivoi,Gras Italique,Félkövér dőlt,Grassetto Corsivo,Vet Cursief,Halvfet Kursiv,Pogrubiona kursywa,Negrito Itálico,Полужирный Курсив,Tučná kurzíva,Fet Kursiv,Kalın İtalik,Krepko poševno,nghiêng đậm,Lodi etzana
/usr/share/fonts/liberation/LiberationSans-Regular.ttf: Liberation Sans:style=Regular
[root@localhost new]# 

5、成功咯!哇哈哈哈哈!

ps:

# mkfontscale (如果提示 mkfontscale: command not found,需自行安装 # yum install mkfontscale )

# mkfontdir 

# fc-cache -fv (如果提示 fc-cache: command not found,则需要安装# yum install fontconfig )

相关阅读

U盘安装WIN8.1原版纯净系统教程附免费下载地址

注意事项:安装此系统前需制作好装机版U盘启动盘,可在软件目录中点击“PE系统“查看制作教程;本系统为原版纯净系统;重装系

Eclipse中调整字体的大小

1.点击window,然后选择preferences,进入下面的界面。在输入框中输入font,然后选择colors and fonts ,再选择basic: 2.在basic中找到te

MATLAB 2010b安装过程出现的问题解决方案

1.按照网上的教程安装完,弹出未能找到network.lic文件,于是按照弹出的路径,去相应的文件夹建一个新的文件2.破解文件夹crack里的lic_

安装python时报错 An error occurred during the inst

安装Python时报错,详细错误信息如图1.  图1在我的windows 7系统中找到  控制面板->程序或功能->打开或关闭Windows功能  在弹框

Ubuntu:安装deb文件包

安装deb文件包:sudo dpkg -i *.deb #如果报依赖错误执行下面语句再试 sudo apt-get -f --fix-missing install

分享到:

栏目导航

推荐阅读

热门阅读