LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 11-29-2018, 12:28 PM   #1
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Rep: Reputation: 68
Best way to keep user installed fonts separate from default fonts?


What would be the best way to keep the fonts I install separate from those which come with Slackware? I want to install a whole bunch of fonts for some graphic design testing - but ideally I'd rather not mix them with those already in /usr/share/fonts/TTF (the new ones are TTF fonts) - so that I can easily remove them later. Would creating a separate dir under /usr/share/fonts be acceptable?

Last edited by xj25vm; 11-29-2018 at 12:29 PM.
 
Old 11-29-2018, 12:47 PM   #2
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 2,011

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619
I think ~/.local/share/fonts is the standard place for that.
 
Old 11-29-2018, 05:49 PM   #3
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
For years I have stored mine in /usr/local/share/fonts.
 
Old 11-29-2018, 06:03 PM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,237

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
Quote:
Originally Posted by montagdude View Post
I think ~/.local/share/fonts is the standard place for that.
That. Or build a Slackware package.

Code:
mkdir -p /tmp/package-myFonts-1.0/usr/share/fonts/TTF
cp *.ttf /tmp/package-myFonts-1.0/usr/share/fonts/TTF
cd /tmp/package-myFonts-1.0
makepkg -l y -c n /tmp/myFonts-1.0-noarch-1.tgz

Last edited by dugan; 11-29-2018 at 06:05 PM.
 
Old 11-29-2018, 06:35 PM   #5
Pixxt
Member
 
Registered: May 2008
Distribution: Slackware, Debian,
Posts: 288

Rep: Reputation: 186Reputation: 186
Speaking of which is there a easy way to check which fonts are default Slackware installed, because dummy me a year ago copied a few foreign script fonts over to the default TTF dir and now I cant tell which from which out the standard Liberation, Deja Vu font and such
 
Old 11-29-2018, 06:42 PM   #6
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
Quote:
Originally Posted by Pixxt View Post
Speaking of which is there a easy way to check which fonts are default Slackware installed, because dummy me a year ago copied a few foreign script fonts over to the default TTF dir and now I cant tell which from which out the standard Liberation, Deja Vu font and such
I've asked myself the same question. I suppose the date of the font files might be a giveaway - if you can remember roughly when you've installed the new fonts.
 
Old 11-29-2018, 06:43 PM   #7
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
Quote:
Originally Posted by upnort View Post
For years I have stored mine in /usr/local/share/fonts.
I was under the impression that Slackware doesn't really tend to use /usr/local. But I could be wrong :-)
 
Old 11-29-2018, 07:21 PM   #8
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by xj25vm View Post
I was under the impression that Slackware doesn't really tend to use /usr/local. But I could be wrong :-)
It generally isn't used with packages, so scripts from SBo don't use it. But if you need to add something specific to your machine, /usr/local/ is designed just for that.
 
Old 11-29-2018, 07:29 PM   #9
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,237

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
Quote:
Originally Posted by Pixxt View Post
Speaking of which is there a easy way to check which fonts are default Slackware installed, because dummy me a year ago copied a few foreign script fonts over to the default TTF dir and now I cant tell which from which out the standard Liberation, Deja Vu font and such
Grep /var/log/packages for /usr/share/fonts, and compare that to what's in fc-list?

Last edited by dugan; 11-29-2018 at 07:34 PM.
 
1 members found this post helpful.
Old 11-29-2018, 08:01 PM   #10
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Quote:
I was under the impression that Slackware doesn't really tend to use /usr/local. But I could be wrong :-)
Note bassmadrigal's response. Also this -- one of my pet peeves is when upstream packagers and distro maintainers place their system files in my /usr/local/.
 
2 members found this post helpful.
Old 11-29-2018, 10:17 PM   #11
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by upnort View Post
Also this
Just so you know, FHS 2.2 has been superseded in favor of FHS 3.0.

Quote:
Originally Posted by upnort View Post
one of my pet peeves is when upstream packagers and distro maintainers place their system files in my /usr/local/.
Unfortunately, the language isn't specific enough in the FHS to make it definitive on what should go where. Some believe that only files from the OS should go there and all 3rd-party, whether packaged or self-compiled, should go in /usr/local/, while others believe that any packages should go in /usr/ and any self-compiled should go in /usr/local/.

I fall under the second group... specifically that files that are tracked by the package manager should go in /usr/ and files that won't be tracked (self-compiled, scripts, random system fonts, etc) should go in /usr/local/.
 
1 members found this post helpful.
Old 11-30-2018, 01:22 AM   #12
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,462
Blog Entries: 7

Rep: Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561Reputation: 2561
Quote:
Originally Posted by bassmadrigal View Post
I fall under the second group... specifically that files that are tracked by the package manager should go in /usr/ and files that won't be tracked (self-compiled, scripts, random system fonts, etc) should go in /usr/local/.
This.

For reference, all you need to do is create a file called /etc/fonts/local.conf

And put the following in it:

Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file to configure system font access -->
<fontconfig>
<!-- Font directory list -->
        <dir>/usr/local/share/fonts</dir>
</fontconfig>
Copy your font files into /usr/local/share/fonts and run fc-cache. Job done.
 
2 members found this post helpful.
Old 11-30-2018, 08:29 AM   #13
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by bassmadrigal View Post
I fall under the second group... specifically that files that are tracked by the package manager should go in /usr/ and files that won't be tracked (self-compiled, scripts, random system fonts, etc) should go in /usr/local/.
I even use a third method: big packages (that aren't _slackware_ packages), like Maple, GNU Octave etc go under /opt/<package_name> - with bin, lib and such under there:
/opt/octave:
drwxr-xr-x 2 root root 304 2018-05-25 12:48:48 bin
drwxr-xr-x 3 root root 80 2018-05-25 12:48:46 include
drwxr-xr-x 3 root root 80 2018-05-25 12:48:46 lib
drwxr-xr-x 3 root root 72 2018-05-25 12:48:46 libexec
drwxr-xr-x 6 root root 152 2018-05-25 12:49:00 share
and special startup scripts will add the needed directories to PATH, MANPATH, LD_LIBRARY_PATH etc.

This /opt can get rather big when you've got lots of third-party software:
/dev/sda2 11074 5063 6012 46% /opt
(in MB blocks). As you see I made it into its own partition.
 
Old 12-01-2018, 04:07 AM   #14
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
Quote:
Originally Posted by rkelsen View Post
This.

For reference, all you need to do is create a file called /etc/fonts/local.conf

And put the following in it:

Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file to configure system font access -->
<fontconfig>
<!-- Font directory list -->
        <dir>/usr/local/share/fonts</dir>
</fontconfig>
Copy your font files into /usr/local/share/fonts and run fc-cache. Job done.
Thank you - all very straightforward!
 
Old 12-01-2018, 04:44 AM   #15
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,976

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by dugan View Post
That. Or build a Slackware package.
This is what I do.
 
  


Reply

Tags
fonts, ttf



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
Best way to keep 'user home' in-sync between two laptops running ubuntu 12.04 rishipandit007 Linux - General 1 07-28-2013 12:03 PM
/.fonts from /etc/fonts/fonts.conf barunparichha Linux - Software 3 11-27-2009 08:16 AM
Fonts, fonts and more fonts raysr SUSE / openSUSE 2 02-09-2009 08:43 PM
Separate Partitions for Separate User groups volvic Slackware - Installation 2 09-16-2004 02:42 AM
Fonts, fonts and more fonts ... terran4000 Linux - Software 1 03-19-2004 03:43 AM

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

All times are GMT -5. The time now is 08:42 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