VectorLinux
October 25, 2014, 05:15:13 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Fonts and how to install them...  (Read 4694 times)
toothandnail
Tester
Vectorian
****
Posts: 2527


« on: February 28, 2008, 06:13:10 pm »

I recently built the MS corefonts using cruxports4sackware. The package built without any problems, and seemed to install correctly. However, none of the MS fonts became available. When I had a look at the package, it had built a directory tree /usr/share/fonts/corefonts to put the new TTF font file into. There is no sign of any attempt being made to update the font index, nor to update the new directory.

I tried manually updating the font directories and ran 'fc-cache -vf'. Still no sign of the new fonts. In the end, in desperation, I copied all the files into /usr/share/fonts/TTF and updated the cache, which has worked. Not a good way of updating the fonts though.

Can someone tell me what the normal way of updating fonts in Vector would be? It seems I'm missing something...

paul.
Logged
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #1 on: February 28, 2008, 07:31:56 pm »

What I'll tell you here will work with any fonts you add. All the steps may not be necessary, but they won't hurt. You must do all of them as root. Close down X so that you're at a console. You could probably do them at a root terminal but you'll have to close and then restart X for all of them to take effect.

Do these steps as root:
--Edit /etc/X11/xorg.conf by adding the new fonts directory to Section "Files" like this:
   FontPath "/usr/share/fonts/corefonts"

--Save xorg.conf.

--Go to the /usr/share/fonts/corefonts directory and open it.

--Do
pwd
   at the command line to make sure you're in the /usr/share/fonts/corefonts directory.

--Run these commands in this order at the prompt:
mkfontscale
mkfontdir

--Go to /etc/fonts and copy the fonts.conf file to local.conf in the same directory. Edit /etc/fonts/local.conf by adding this line to the <!-- Font directory list --> section:
<dir>/usr/share/fonts/corefonts</dir>

--Save local.conf and exit.

As root, run this command:
fc-cache

Restart X (startx or the specific command for your window manager). All your fonts should now be available to all font-aware applications for all users.

You can add fonts to your home directory's /.fonts directory. If you don't have one, just make the directory. Add the fonts there and run
fc-cache
as user. The fonts will be available to you but not to other users.

These steps will insure that all your applications will see the fonts and be able to use them. Every now and then a program will not pay attention to the fontconfig system, but the steps I described should enable the fonts in those, too.

I have added three directories to my system:
/usr/share/fonts/my_tt
/usr/share/fonts/my_type1
/usr/share/fonts/truetype

They're what they say. My own TrueType fonts are in /my_tt, my own Type 1 fonts are in /my_type1, and the Microsoft core fonts (copied from my Windows system) are in /truetype. I like to keep the default directories free of my own fonts. I always create a /usr/share/moved_fonts directory into which I move the non-Western fonts and other fonts I'll never use. This must be done as root. /usr/share/moved_fonts is not in my fonts path, so when I run fc-cache as root, the fonts list is fixed so that I don't get that long list of fonts I won't use. If I ever find I need one of those fonts, I can just move it back into the directory it came from in /usr/share/fonts.
--GrannyGeek
« Last Edit: January 04, 2010, 07:27:42 pm by GrannyGeek » Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
toothandnail
Tester
Vectorian
****
Posts: 2527


« Reply #2 on: February 29, 2008, 05:14:26 pm »

 Smiley Thanks. A complicated process...

I had a look at a couple of Zenwalk font packages. They get round the problem by using existing directroies (/usr/share/fonts/TTF for the corefonts, for instance) which means that the package's doinst.sh can update and make the fonts available. Not as elegant as keeping the fonts in their own directory, but certainly simpler in terms of updates.

I will have to copy your procedure and add it to my useful-stuff.txt. Otherwise I'll have forgotten by the next time the question comes up. Thanks again.

paul.
Logged
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #3 on: February 29, 2008, 09:23:36 pm »

You can put the fonts in any font directory already on the fonts path. Just run fc-cache as root after you do this.

I prefer to keep things organized and using additional directories I create helps me to do this because I know what came with the system and what I added.

I've never cared for scripts or things like KDE's font installer because I think knowing how to do it yourself is very valuable and it's actually quite easy once you try it. The easiest way to install fonts is just to put the TTF files in your home directory's /.fonts directory and run fc-cache. If you're using Type 1 fonts, you need a PFB file and an AFM file for any font you want to install. They can go in ~/.fonts too. fc-cache will make them available to your system (but just for you if you install in your ~/.fonts).
--GrannyGeek
Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
fuelinux
Member
*
Posts: 52



« Reply #4 on: April 07, 2008, 05:52:53 am »

Strange, but I have no /usr/share/fonts directory  Shocked
Should I create one?
Logged

Vector Linux 5.8 Standard
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #5 on: April 07, 2008, 06:25:47 pm »

In VL 5.8 the fonts aren't in /usr/share/fonts. I don't remember exactly where they are, but I think it's /usr/X11R6/lib/fonts--that's close, anyway. Do a
locate *.ttf
and see what paths turn up.
--GrannyGeek
Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
Hamzah
Member
*
Posts: 20


Wanna be hacker


« Reply #6 on: January 03, 2010, 09:01:12 pm »

--Go to /etc/fonts and copy the fonts.conf file to local.conf in the same directory. Edit /etc/local.conf by adding this line to the <!-- Font directory list --> section:
<dir>/usr/share/fonts/corefonts</dir>


I can't find "/etc/local.conf". Did you mean "/etc/fonts/local.conf" ?
« Last Edit: January 03, 2010, 09:04:59 pm by Hamzah » Logged

1001 0101 0010 0110 0011 0000 1010 0111 1101 0100 1001 1011 1000 0100 1111 1100
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #7 on: January 04, 2010, 07:43:41 pm »

--Go to /etc/fonts and copy the fonts.conf file to local.conf in the same directory. Edit /etc/local.conf by adding this line to the <!-- Font directory list --> section:
<dir>/usr/share/fonts/corefonts</dir>


I can't find "/etc/local.conf". Did you mean "/etc/fonts/local.conf" ?

I wrote that so long ago that I don't remember, but I'm sure you're right. I've edited my post to get the right path.

I'm not sure those instructions are relevant in VL6. I see that I never edited /etc/fonts/fonts.conf or /etc/fonts/local.conf in VL6 Light and Standard. Generally, I install a font by copying or making a symlink in ~/.fonts to fonts I want to install. Then I run fc-cache to make sure the fonts are available. I'm not even sure that's necessary for fonts in ~/.fonts but it can't hurt.
--GrannyGeek
Logged

Registered Linux User #397786

Happily running VL 7 Gold on  a Sempron LE-1300 desktop (2.3 GHz), 4 G RAM,  GeForce 6150 SE onboard graphics and on an HP Pavilion dv7 i7, 6 gigs, Intel 2nd Generation Integrated Graphics Controller
Hamzah
Member
*
Posts: 20


Wanna be hacker


« Reply #8 on: January 06, 2010, 11:08:10 pm »

I'm not sure those instructions are relevant in VL6. I see that I never edited /etc/fonts/fonts.conf or /etc/fonts/local.conf in VL6 Light and Standard. Generally, I install a font by copying or making a symlink in ~/.fonts to fonts I want to install. Then I run fc-cache to make sure the fonts are available...

    Yeah, it's easier and simpler
« Last Edit: January 06, 2010, 11:15:34 pm by Hamzah » Logged

1001 0101 0010 0110 0011 0000 1010 0111 1101 0100 1001 1011 1000 0100 1111 1100
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!