LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-06-2011, 07:44 AM   #1
newlinux1995
LQ Newbie
 
Registered: Jan 2011
Distribution: CentOS 5.5
Posts: 4

Rep: Reputation: 0
Question Installing Fonts using shell


How can i make a shell script that will install any font it finds in a directory? For example 2 true type fonts downloaded from internet and kept in a single directory, how to install them into the system font directory by a shell script?
 
Old 01-06-2011, 08:14 AM   #2
an15wn
LQ Newbie
 
Registered: Dec 2010
Location: Jakarta, ID
Distribution: Fedora, Ubuntu
Posts: 18

Rep: Reputation: Disabled
Why do you need to write a script if you can just make a link?

Just save your TTFs in a directory called ~/.fonts directory. DONE!

Simple isn't in?

Note: I'm using Ubuntu & Fedora.
 
Old 01-06-2011, 08:37 AM   #3
newlinux1995
LQ Newbie
 
Registered: Jan 2011
Distribution: CentOS 5.5
Posts: 4

Original Poster
Rep: Reputation: 0
So you mean i just paste my TTF files into it

Last edited by newlinux1995; 01-06-2011 at 08:52 AM.
 
Old 01-06-2011, 10:23 PM   #4
an15wn
LQ Newbie
 
Registered: Dec 2010
Location: Jakarta, ID
Distribution: Fedora, Ubuntu
Posts: 18

Rep: Reputation: Disabled
Quote:
Originally Posted by newlinux1995 View Post
So you mean i just paste my TTF files into it
YES!

That's all you need to do.

You can create directory ~/.fonts and then
  • copy all your TTFs into it OR
  • if you already collect your TTFs in a directory, just make a symbolic link to your collection inside ~/.fonts directory.

I think that other distro will behave just like Fedora & Ubuntu...

Good luck...

Last edited by an15wn; 01-06-2011 at 10:29 PM.
 
1 members found this post helpful.
Old 01-06-2011, 10:34 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 16,750
Blog Entries: 27

Rep: Reputation: 5082Reputation: 5082Reputation: 5082Reputation: 5082Reputation: 5082Reputation: 5082Reputation: 5082Reputation: 5082Reputation: 5082Reputation: 5082Reputation: 5082
You made need to run fc-cache or reboot for the new fonts to be visible to the system.
 
Old 01-06-2011, 10:50 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,502

Rep: Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617Reputation: 2617
one of the surprises i had years ago was just HOW easy it was to install a few things

years ago i went looking for "the tool" to install fonts - like on windows

I think that the OS deves made it TOO EASY
copy it to the users .fonts folder and logout and back in
or the system fonts folder and reboot /usr/share/fonts
 
Old 01-06-2011, 10:53 PM   #7
daniel2010
LQ Newbie
 
Registered: Dec 2010
Posts: 3

Rep: Reputation: 0
Fonts for wine

if you need to install windows fonts for wine try:

http://tips-linux.net/en/linux-ubunt...ows-fonts-wine
-----------------------
linux commands
 
Old 01-06-2011, 11:10 PM   #8
an15wn
LQ Newbie
 
Registered: Dec 2010
Location: Jakarta, ID
Distribution: Fedora, Ubuntu
Posts: 18

Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
You made need to run fc-cache or reboot for the new fonts to be visible to the system.
No WE don't...

I already implemented and tested for its instant effect WITHOUT running fc-cache.

Yes, it was time when we need to run fc-cache. But the time was out...
 
Old 01-06-2011, 11:18 PM   #9
an15wn
LQ Newbie
 
Registered: Dec 2010
Location: Jakarta, ID
Distribution: Fedora, Ubuntu
Posts: 18

Rep: Reputation: Disabled
Quote:
Originally Posted by John VV View Post
copy it to the users .fonts folder and logout and back in
Even I don't need to logout and relogin... The effect was just IMMEDIATELY...

Thanks to the team that made linux so easy...

Last edited by an15wn; 01-06-2011 at 11:23 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing new fonts runa Linux - Desktop 3 08-25-2006 10:10 AM
Installing new fonts Mercurius Slackware 20 08-16-2006 05:36 PM
Installing Fonts? carlosinfl Debian 5 05-05-2006 07:00 PM
Installing fonts on 10.2 Hondro Slackware 2 03-31-2006 07:51 PM
shell text fonts are larger than normal??? tsw Mandriva 8 05-12-2004 08:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration