LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-16-2011, 12:43 AM   #1
ADX
Member
 
Registered: Jul 2011
Location: 127.0.0.1
Distribution: Slackware64-13.37
Posts: 47

Rep: Reputation: 0
Font installation


Can anyone point me in the right direction for installing fonts (specifically truetype fonts) ? I've come across a few threads that mentioned taking a look at /etc/xorg.conf but the file doesn't seem to exist (a user mentioned it's not needed anymore or something..).

Thanks
 
Old 07-16-2011, 12:51 AM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
copy the *.ttf files to /usr/share/fonts/TTF

then
Code:
fc-cache -vf
to update your font cache.
 
1 members found this post helpful.
Old 07-16-2011, 01:13 AM   #3
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.2
Posts: 1,909

Rep: Reputation: 652Reputation: 652Reputation: 652Reputation: 652Reputation: 652Reputation: 652
KDE also has a built in font installer.
 
Old 07-16-2011, 01:22 AM   #4
SqdnGuns
Senior Member
 
Registered: Aug 2005
Location: Pensacola, FL
Distribution: Slackware64 Current
Posts: 1,069

Rep: Reputation: 151Reputation: 151
You can also create a .fonts directory in your ~ folder and drop them in there.
 
1 members found this post helpful.
Old 07-16-2011, 09:18 AM   #5
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1063Reputation: 1063Reputation: 1063Reputation: 1063Reputation: 1063Reputation: 1063Reputation: 1063Reputation: 1063
It's generally a good idea to not mix add-on fonts with the distribution fonts -- you might overwrite something you don't want overwritten (files with the same name and the like).

You need to do the following as root.

I keep add-on fonts in /usr/local/share/fonts in directories named Adobe (the Adobe Type Library is in there), MSfonts (TTFs copies from Winders, naughty, I know) and myfonts (fonts I've picked up over the years that don't fit anywhere else).

For your TrueType font files you should
Code:
cd /usr/local/share/fonts/dirname                        (the directory name you put them in)
mkfontscale                                              (see the man page)
mkfontdir                                                (see the man page)
Not mandatory but recommended.

Then, in /etc/fonts I create a local.conf file that contains
Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file to configure system font access -->
<fontconfig>
        <dir>/usr/local/share/fonts/Adobe</dir>
        <dir>/usr/local/share/fonts/MSfonts</dir>
        <dir>/usr/local/share/fonts/myfonts</dir>
</fontconfig>
and that takes care of that -- they're available system-wide to all applications.

Hope this helps some.
 
1 members found this post helpful.
Old 07-16-2011, 09:23 AM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 10,188

Rep: Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752
I personally consider the procedure recommended by my "Optimizing Slackware Linux's Fonts" guide to be the best practice. See my .sig for the link.

Last edited by dugan; 07-16-2011 at 09:27 AM.
 
2 members found this post helpful.
Old 07-16-2011, 02:19 PM   #7
ADX
Member
 
Registered: Jul 2011
Location: 127.0.0.1
Distribution: Slackware64-13.37
Posts: 47

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tronayne View Post
It's generally a good idea to not mix add-on fonts with the distribution fonts -- you might overwrite something you don't want overwritten (files with the same name and the like).

You need to do the following as root.

I keep add-on fonts in /usr/local/share/fonts in directories named Adobe (the Adobe Type Library is in there), MSfonts (TTFs copies from Winders, naughty, I know) and myfonts (fonts I've picked up over the years that don't fit anywhere else).

For your TrueType font files you should
Code:
cd /usr/local/share/fonts/dirname                        (the directory name you put them in)
mkfontscale                                              (see the man page)
mkfontdir                                                (see the man page)
Not mandatory but recommended.

Then, in /etc/fonts I create a local.conf file that contains
Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file to configure system font access -->
<fontconfig>
        <dir>/usr/local/share/fonts/Adobe</dir>
        <dir>/usr/local/share/fonts/MSfonts</dir>
        <dir>/usr/local/share/fonts/myfonts</dir>
</fontconfig>
and that takes care of that -- they're available system-wide to all applications.

Hope this helps some.
Thanks, that was very helpful.

Though, I do understand why there are so many font folders. Wouldn't it be easier to just have a single folder and then divide those into sub-folders that were application specific fonts? What's the difference between putting them in /usr/local/share/fonts/ and /usr/share/fonts if they both end up being available system-wide? One more question, how does the system know to read "local.conf" (I don't seem to have one by default)?
 
Old 07-16-2011, 05:24 PM   #8
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1063Reputation: 1063Reputation: 1063Reputation: 1063Reputation: 1063Reputation: 1063Reputation: 1063Reputation: 1063
Quote:
Though, I do understand why there are so many font folders. Wouldn't it be easier to just have a single folder and then divide those into sub-folders that were application specific fonts? What's the difference between putting them in /usr/local/share/fonts/ and /usr/share/fonts if they both end up being available system-wide? One more question, how does the system know to read "local.conf" (I don't seem to have one by default)?
Generally, you want to have "like" font files in a "same" directory. Not for any real "technical" reasons but simply to keep things neat and orderly. There are a number of font directories in your installation
Code:
ls /usr/share/fonts
100dpi/  75dpi/  cyrillic/  encodings/  misc/  OTF/  Speedo/  TTF/  Type1/  util/
as above, each containing unique types of font files.

If you put your "local" font files in with the distribution fonts, that's perfectly all right but it turns out the be a little more neat and orderly to put "local" stuff in "local" directories if for no other reason than you'll know where they are.

The system reads whatever ".conf" files it finds in /etc/fonts. No magic involved; if you add one or more local .conf files in /etc/fonts, they'll be read (but there's no need to use multiples, one local configuration file is sufficient). In your case, the file /etc/fonts/local.conf would only contain one entry for the TrueType fonts.

It's not a bad idea to read through Dugan Chen's documentation at the link he give above (http://duganchen.ca/writings/slackware/fonts) -- lots of good ideas there.

Hope this helps some.
 
1 members found this post helpful.
Old 07-16-2011, 06:54 PM   #9
ADX
Member
 
Registered: Jul 2011
Location: 127.0.0.1
Distribution: Slackware64-13.37
Posts: 47

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tronayne View Post
Generally, you want to have "like" font files in a "same" directory. Not for any real "technical" reasons but simply to keep things neat and orderly. There are a number of font directories in your installation
Code:
ls /usr/share/fonts
100dpi/  75dpi/  cyrillic/  encodings/  misc/  OTF/  Speedo/  TTF/  Type1/  util/
as above, each containing unique types of font files.

If you put your "local" font files in with the distribution fonts, that's perfectly all right but it turns out the be a little more neat and orderly to put "local" stuff in "local" directories if for no other reason than you'll know where they are.

The system reads whatever ".conf" files it finds in /etc/fonts. No magic involved; if you add one or more local .conf files in /etc/fonts, they'll be read (but there's no need to use multiples, one local configuration file is sufficient). In your case, the file /etc/fonts/local.conf would only contain one entry for the TrueType fonts.

It's not a bad idea to read through Dugan Chen's documentation at the link he give above (http://duganchen.ca/writings/slackware/fonts) -- lots of good ideas there.

Hope this helps some.
Makes sense now, thanks again.
 
  


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
Installation of Hebrew font sonichedgehog LinuxQuestions.org Member Success Stories 0 04-10-2008 07:21 PM
font installation sulekha Ubuntu 2 08-24-2007 10:18 AM
Font Installation Problem ajkannan83 General 0 04-23-2006 02:19 AM
Command for font-installation pingu Linux - Software 2 04-26-2005 09:00 AM
font installation befuddled Linux - Newbie 0 02-17-2004 08:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:40 AM.

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