Linux下安装TTF字体
While searching the ways of installing true type fonts to linux, I get all sort of solutions. Some will ask you to copy and paste to fonts:/// folders in nautilus, or fonts:/ in konqueror. Some may even ask you to copy your ttf fonts to /usr/share/fonts and run fc-cache. All sort of ways doesn’t works so well during last two years.
Nowadays, I think all sort of ways may works under particular linux distro, the steps to install font might vary between different linux distros, but its they a common way that it will works for any distro? For me, installing custom fonts should be as straight forward as ‘copy and paste’ ttf files to a specific folders without needing to run any command or configuration script.
Recently, I find the ‘copy and paste’ way. I just need to copy my downloaded ttf font files to ~/.fonts. If your home directory does not contain .fonts folder, create a new one
For examples, I download a font from a site, it consist of multiple ttf files.
SF New Republic Bold Italic.ttf
SF New Republic Bold.ttf
SF New Republic Italic.ttf
SF New Republic Sample.jpg
SF New Republic SC Bold Italic.ttf
SF New Republic SC Bold.ttf
SF New Republic SC Italic.ttf
SF New Republic SC.ttf
SF New Republic.ttf
I create a new folder “SF New Republic” in ~/.fonts , and copy all these files into that folder. Next I open oowriter ( open office writer), straight away I can use the font without doing fc-cache or any configurations.
Anyway, there is a command to verify fonts have successfully installed to your system:
New Republic:style=Regular
SF New Republic:style=Bold Italic
SF New Republic SC:style=Bold
SF New Republic SC:style=Italic
SF New Republic SC:style=Regular
SF New Republic SC:style=Bold Italic
SF New Republic:style=Italic
fc-list is actually listing all the installed fonts, with pipe over grep, we can verified whether are those fonts successfully installed.
I have tested this method on:
1. Ubuntu Hardy Heron 8.04
2. Fedora 8
I would like to do a survey at here, if you are running different distro listed above, can you try out this method?
没有评论▼