VectorLinux
November 28, 2014, 12:02:59 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: Need clarification about fonts  (Read 5085 times)
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« on: October 21, 2007, 01:53:01 pm »

Installing fonts in VectorLinux has never been explained in much detail. You can't just say add them to the TTF fonts directory and run fc-cache, because that works in just a limited number of cases.

Some background:
I have over 2000 fonts on my Windows partition. Those fonts are easy to manage in Windows because I use a font manager (Bitstream Font Navigator) that lets me create groups of fonts that I can install and uninstall simply by dragging them into and out of the Installed Fonts panel of the font manager. Naturally, I don't want that huge load of fonts installed in Linux, but we don't have this type of font manager in Linux, so I have to do it another way. Also, I like to keep the default directories in close to pristine condition and not add and remove fonts from them. That's fine if we're talking just a few fonts, but with a large number, it's too cumbersome to manage because you're not going to want all of them installed all the time.

What I do is create three extra font directories (my_tt, my_type1, and truetype). I don't touch /truetype once I populate it with TrueType fonts I want to be always loaded. I move fonts into and out of /my_tt and /my_type1 as needed for whatever I'm working on. I also created another directory (moved_fonts) not under the /fonts directory where I move fonts that I don't want to have installed but don't want to remove from the system permanently.

When you create a font directory, in addition to adding it to the fonts section of xorg.conf you have to run mkfontscale and mkfontdir on all the new font directories. You also have to run fc-cache as root.

But that's not enough!! The font directories also MUST be included in /etc/fonts/fonts.conf. This is what's in mine:
<!-- Font directory list -->                                                   
                                                                               
#       <dir>/usr/share/fonts/OTF</dir>                                         
        <dir>/usr/share/fonts/TTF</dir>                                         
        <dir>/usr/share/fonts/Type1</dir>                                       
        <dir>/usr/share/fonts/my_tt</dir>                                       
        <dir>/usr/share/fonts/my_type1</dir>                                   
        <dir>/usr/share/fonts/truetype</dir>                                   
        <dir>~/.fonts</dir>                                                     

                                                                               
Note the directories I added. If the directories are not listed in /etc/fonts/fonts.conf, the fonts WILL NOT be found and installed when you run fc-cache.

Now, the puzzle. There is this note in /etc/fonts/fonts.conf:

        DO NOT EDIT THIS FILE.                                                 
        IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.                         
        LOCAL CHANGES BELONG IN 'local.conf'.                                   

                                                                               
One problem: that file never gets updated by any normal means I know about. And I know from abundant experience that any added font directories MUST be listed there in order to be installed and available to applications running in X. So, based on my hard-won experience, I disregard that note and simply add my new font directories by editing fonts.conf. When I restart X, the fonts are listed and available to X applications.

Is there some obscure way to get those directories listed in fonts.conf other than editing it myself? And shouldn't we do better about explaining how to create font directories and install and remove fonts? I'd be happy to write a HowTo if people are interested.

I may as well add that it took me a while to figure out how to get rid of all those language fonts in 5.9. I'm glad they're included for those who need them, but keeping all of them installed makes for a long and annoying font list. I finally found them in a couple of fonts directories, moved them out to my /moved_fonts directory, and ran fc-cache. Finally they're gone. We probably should include the information in an obvious place to save users some trouble.
--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
exeterdad
Packager
Vectorian
****
Posts: 2046



« Reply #1 on: October 23, 2007, 02:40:05 pm »

Ohhhhh! Hope this is answered!  Looks like a heck of a start for a "How-to"  Wink
Logged
uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #2 on: October 23, 2007, 05:41:39 pm »

let me help with what I can.
first this
Quote
        DO NOT EDIT THIS FILE.                                                 
        IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.                         
        LOCAL CHANGES BELONG IN 'local.conf'.   

It means anytime you upgrade the fontconfig program the fonts.conf file will be overwrote. I know about this firsthand because the fonts.conf file that vec supplied to me that included the dirs that granny has in her fonts.conf to add was overwrote when i reinstalled fontconfig.
So if you dont plan on updating fontconfig you dont have to worry about losing your changes.

HTH,
Uelsk8s
Logged
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #3 on: October 23, 2007, 06:48:59 pm »

let me help with what I can.
first this
Quote
        DO NOT EDIT THIS FILE.                                                 
        IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.                         
        LOCAL CHANGES BELONG IN 'local.conf'.   

It means anytime you upgrade the fontconfig program the fonts.conf file will be overwrote. I know about this firsthand because the fonts.conf file that vec supplied to me that included the dirs that granny has in her fonts.conf to add was overwrote when i reinstalled fontconfig.
So if you dont plan on updating fontconfig you dont have to worry about losing your changes.

Ah! So the note isn't giving a warning that editing the file would do something bad, it's just saying that if you edit it, it'll be replaced if you update fontconfig.

Well then, what I'm doing is fine. (I thought so, as I've been doing it for a pretty long time without problems.) If I did update fontconfig and fonts.conf got overwritten, I'd simply edit the new fonts.conf to contain the fonts directories I've added to my system.

Shall I go ahead with the HowTo? The process for creating font directories and adding fonts is quite simple. I just didn't want to tell people to edit fonts.conf if that was dangerous advice.

By the way, where is "local.conf"? I couldn't find such a file.
--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
uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #4 on: October 23, 2007, 08:44:42 pm »

The howto would be great to have.
We dont provide a local.conf currently. If you copied fonts.conf to local.conf and made the changes there you could move it from install to install and also not have to worry about it getting overwrote by a slapt-get upgrade or something.

Uelsk8s
Logged
GrannyGeek
Packager
Vectorian
****
Posts: 2567


« Reply #5 on: October 23, 2007, 10:12:57 pm »

We dont provide a local.conf currently. If you copied fonts.conf to local.conf and made the changes there you could move it from install to install and also not have to worry about it getting overwrote by a slapt-get upgrade or something.

Would it go in /etc/fonts along with fonts.conf? I'd like to try it and see what happens.
--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
uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #6 on: October 23, 2007, 10:47:36 pm »

We dont provide a local.conf currently. If you copied fonts.conf to local.conf and made the changes there you could move it from install to install and also not have to worry about it getting overwrote by a slapt-get upgrade or something.

Would it go in /etc/fonts along with fonts.conf? I'd like to try it and see what happens.
--GrannyGeek
yes
Let us know how it works

Uelsk8s
Logged
fuelinux
Member
*
Posts: 52



« Reply #7 on: April 08, 2008, 12:25:18 am »

I hate flooding, but any development in this regard?
Logged

Vector Linux 5.8 Standard
caitlyn
Packager
Vectorian
****
Posts: 2876


WWW
« Reply #8 on: May 16, 2008, 09:48:30 am »

The handling of fonts changed radically in X.org 7.x and a lot of what I read above is outdated.  You don't edit /etc/fonts/fonts.conf anymore because it simply calls files from /etc/fonts/conf.avail  Vector Linux DOES provide a local.conf file but the name and location have changed.  it's now at /etc/fonts/conf.avail/51-local.conf  That is the file you edit.

There is a bug in VL 5.9 where a number of fonts are installed but not enabled by default.  A package called fontfix (in the testing repository, really needs to be moved to extra) can be installed and it enables all the "standard" X fonts that other distros have.

Many optional font packages (i.e.: the Culmus package of Hebrew fonts) will add their own cont files to /etc/fonts/conf.avail  Many optional font packages, especially non-TTF fonts, will need to place or edit files here.

HTH...
Cait
Logged

eMachines EL-1300G desktop, 1.6GHz AMD Athlon 2650e CPU, 4GB RAM, nVidia GeForce 6150 SE video
CentOS 6.5 (will try VL64-7.1 soon)

Toshiba Satellite A135-S4727,  Intel Pentium T2080 / 1.73 GHz, 2GB RAM, Intel GMA 950

HP Mini 110 netbook, 1.6GHz Intel Atom CPU, 2GB RAM, Intel 950 video, VL 7.1
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!