LinuxQuestions.org
Review your favorite Linux distribution.
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-30-2003, 11:43 PM   #1
Lagg
Member
 
Registered: Jul 2003
Distribution: Slackware
Posts: 67

Rep: Reputation: 15
Angry Gimp is driving me NUTS!!!


Gimp is driving me nuts. All i want is some TTF fonts to work in it, but it absoulty refuses to do so. 1st i tried getting them to work in gimp 1.2 (verison that comes with slackware 9)

It woudn't even reconize them on font list.

i got gimp 1.3 and it puts them on the list, but when i try to use it, it defaults to sans because it says it can't read it

what gives?? the fonts i have installed work perfectly in every other app that i am running. EXCEPT the gimp, so i must be doing somthing right!!!

is there a trick to getting them to work ?

any help AT ALL will be appresiated.
 
Old 07-31-2003, 04:45 PM   #2
Locura
Member
 
Registered: May 2003
Distribution: Ubuntu 6.10 SE, Mac OS 10.4.8
Posts: 370

Rep: Reputation: 30
Run the following command from a terminal: xset q

Look at the FontPath section of the output from that command. Is the directory that your TTF fonts were installed in on that list?
 
Old 07-31-2003, 10:28 PM   #3
Rodrin
Member
 
Registered: May 2003
Location: Upstate NY, U.S.
Distribution: Slackware
Posts: 248

Rep: Reputation: 31
The Gimp version 1.3 is a development version, so there may be a bug that is contributing to your problem. As far as fonts go, version 1.3 differs from version 1.2 in that 1.3 uses fontconfig to acquire fonts (a new feature), and 1.2 uses the older method of getting fonts from the X server. The xset q command that Locura mentioned is relevant to version 1.2, but it should not really be relevant to 1.3. It's possible that something else is contributing to your problem, but if the True Type fonts that you are talking about work correctly in the versions of Mozilla and GNOME that come with Slackware 9.0, then they really should work with Gimp 1.3 as well. Here is a general rundown of everything that should be necessary to get True Type fonts to work with both fontconfig enabled programs (Gimp 1.3, Mozilla, GNOME, etc.) and those that still work the old way (Gimp 1.2, KDE, etc.) in Slackware 9.0. You must be root for just about every step:

1. Acquire compatible True Type fonts. You should get those that are designed to work with Windows. I have read that you can also convert Apple True Type fonts to Windows True Type fonts, but I have never tried to do this.

2. Place the True type fonts in an appropriate directory. (You will need to be root unless you decide to put them in a .fonts directory under your home directory; I have never put them there, so I don't know the pitfalls) If you want to make it easy on yourself and not have to edit any more config files than are necessary, then I suggest you put them in one of the two places that fontconfig looks by default. You can put them in
/usr/X11R6/lib/X11/fonts/TTF
or you can put them in a subdirectory of /usr/share/fonts. It doesn't matter what you name it, but I suggest TTF for consistency. That would make the directory
/usr/share/fonts/TTF
Be warned that they do not seem to work correctly with the default configuration if you put them in the /usr/share/fonts directory itself and not a subdirectory of it.

3. Make the font files world readable. Do not leave this step out or various programs will not run at all. You can do this by going to each directory you have placed True Type fonts in from the command prompt and running the command
chmod 644 *.ttf *.TTF

4. To make the fonts available to fontconfig enabled programs simply run
/usr/X11R6/bin/fc-cache
This can be done from anywhere. This is the last step for fontconfig enabled programs. You will need to restart any of these programs that you have running. They should then work. This step is not necessary for programs that are not fontconfig enabled. You can safely leave this step out with a default Slack 9 configuration and it will be done automatically the next time you reboot.

5. For X programs that are not fontconfig enabled you should also run the commands
/usr/X11R6/bin/mkfontscale
/usr/X11R6/bin/mkfontdir

from each directory that you installed True Type fonts in. The order of these commands is important. Do not reverse them (if you reverse them accidentally, don't worry; just run mkfontdir over again).

6. Also for X programs that are not fontconfig enabled, edit your XF86Config file.

(a) In the section labeled
Section "Module"
Add or uncomment a line to read
Load "freetype"
You could alternatively use Load "xtt" I have never used xtt instead of freetype, but I have heard that it can render better for Far East fonts and worse for Western ones. Whichever one you use, make sure that there is no line present for the other, or that it is commented out. You must not try to load both freetype and xtt modules.

(b) In the section labeled
Section "Files"
add lines to the font path for the directories you placed your fonts in. If you used the suggested places these lines will be
FontPath "/usr/X11R6/lib/X11/fonts/TTF/"
and
FontPath "/usr/share/fonts/TTF/"
Keep in mind that the order of the FontPath statements determines the order your X server will search the directories in. It will use the first font name match it finds, so if you have a Type 1 font named "Courier" and a True Type font named "Courier," it will use whichever occurs first in the font path. You should place these statements in the order you would prefer your fonts to be used.

7. For X Window programs that are not fontconfig enabled to have access to these fonts you will need to restart your X server or run the commands
xset +fp /usr/X11R6/lib/X11/fonts/TTF/,/usr/share/fonts/TTF/
xset fp rehash

and probably restart the program. Note that these commands add font paths for your current session (only), while the previous step added them for all future X sessions (that is why you can just restart your X server instead). If you aren't already running freetype or xtt in your current session, then I believe you will have to restart your X server.

That's it. All your X Window programs should now have access to your True Type fonts. I should probably make this post into a "Slackware 9 True Type Font HOWTO" somewhere.

Last edited by Rodrin; 08-03-2003 at 04:27 PM.
 
Old 07-31-2003, 11:10 PM   #4
Locura
Member
 
Registered: May 2003
Distribution: Ubuntu 6.10 SE, Mac OS 10.4.8
Posts: 370

Rep: Reputation: 30
Yeah. One note about adding TrueType fonts, you really do have to make sure that the fonts are legit. I tried adding some I found on some free fonts site, and I couldn't get them to show up in GIMP at all. In fact, it not only made those ones disappear, it made all the other ones that were in my TTF directory disappear from GIMP. Running xset q showed that that directory was not in the fontpath for the X server. I tried adding it manually and got an error, and it wouldn't allow me to add it. Once I tracked down these fonts that I had just added and removed them all, and rebuilt the fonts.dir and fonts.scale files, I could re-add my TTF directory to the fontpath.
 
Old 08-01-2003, 11:35 AM   #5
Lagg
Member
 
Registered: Jul 2003
Distribution: Slackware
Posts: 67

Original Poster
Rep: Reputation: 15
oh wow much <3 for the Rodrin and the locura.

im gonna test this, wll post once i do it.
 
Old 08-04-2003, 03:35 PM   #6
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
You also need to make sure that you have the path to your fonts in /etc/fonts/fonts.config or /etc/fonts/fonts.local for fc-cache to pick them up.

Note that if you have several sub-directories of fonts, eg

/usr/local/X11R6/lib/X11/fonts/truetype/microsoft
/usr/local/X11R6/lib/X11/fonts/truetype/misc

then you only need to specify the parent directory

/usr/local/X11R6/lib/X11/fonts/truetype
 
Old 08-04-2003, 04:44 PM   #7
Rodrin
Member
 
Registered: May 2003
Location: Upstate NY, U.S.
Distribution: Slackware
Posts: 248

Rep: Reputation: 31
Yes, Corin, you are correct about needing those paths in /etc/fonts/fonts.config or /etc/fonts/fonts.local. I mentioned in passing that you should use the directories that I suggested if you did not want to edit more configuration files than necessary. That is because these directories are already checked in Slackware 9 by default. However, it would have been good for me to mention that if you did decide to use other directories, you would have to edit one of these files to make them work for fontconfig enabled programs, even if I did not explain precisely what changes you would have to make.
 
Old 08-04-2003, 07:40 PM   #8
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
Rodrin -- thanks for the confirmation.

Having been burned once by mixing up stuff I have installed myself as source packages or extras as fonts, themes etc, I always put non pre-packaged (rpm or deb) software on /usr/local, and if I am installing a software package, as opposed to just a theme or a font, with make install, then I use the software package stow to keep things in order.

Somebody asked the same question about installing a TTF font in another thread, so you can see my much less prosaic equivalent answer there.
http://www.linuxquestions.org/questi...threadid=76862
 
Old 08-04-2003, 11:12 PM   #9
Rodrin
Member
 
Registered: May 2003
Location: Upstate NY, U.S.
Distribution: Slackware
Posts: 248

Rep: Reputation: 31
Some of the steps you take are similar to things I do to keep these things straight. I put all fonts that I add in Slack 9 in the /usr/share/fonts directory since all the originals are in /usr/X11R6/lib/X11/fonts. When I am installing a program from source, I use checkinstall for the installation step rather than doing a make install. That makes the installation into a Slackware package which I can easily remove with Slackware's packaging tools. Since I generally install them all into /usr/local, it's pretty easy to see which are which. Also, since you write the package description yourself for any new package you make with checkinstall, you can plainly put "compiled from source" or whatever else you want into the description.
 
Old 08-05-2003, 02:12 PM   #10
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
Thanks for your critique.

I did try checkinstall for a while, but was not happy with it, and seemed to have to do work on the script to get it to build packages with the description and contents I wanted, so I gave up on it. stow takes a very simple approach and works fine. It also means that since I keep /usr and /usr/local on separate partitions I can easily see whether it is default packages which are growing in size or my own installed software.
 
Old 08-05-2003, 06:01 PM   #11
Rodrin
Member
 
Registered: May 2003
Location: Upstate NY, U.S.
Distribution: Slackware
Posts: 248

Rep: Reputation: 31
Your problems with checkinstall might be related to the fact that you were using it for Debian and/or Red Hat packages. It was originally designed to work with Slackware, and that is where it works the best (a lot better than with the other package types in my opinion). I have never really looked at stow, but I am pretty satisfied with checkinstall up to this point. Maybe I would like stow a lot better for installing compiled software on the Debian boxes I sometimes build. Checkinstall isn't as good for that as it is for Slackware. I may check it out for this purpose.
 
Old 08-05-2003, 09:49 PM   #12
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
The main reason I was having to jump through hoop with checkinstall was because if I was installing a package which already came with a spec file for redhat or some debian control file, I wanted it to use that for building. Of course you are probably going to say I should have move the source code to /usr/src etc and used the spec file with rpmbuild -bb, but I was not thinking of that at the time, and as for Debian, I have to confess, that I have yet to learn how to build a deb.

In case you are not familiar with stow, it is very simple and works with symbolic links.

you have a directory /usr/local/stow/<packagename-version>

under that you have bin, lib, share, X11R6/bin X11R6/lib whatever and it creates symbolic links from there to

/usr/local/bin
/usr/local/X11R6/bin
etc

So in those directories one should only ever see symbolic links. If there are real files there, then it means that something has been put there not according to the stow scheme (and hence is a security/stocktaking check).

So with your standard package installation, eg for some X11 application you do

./configure --prefix /usr/local/X11R6
make
make --prefix /usr/local/stow/<package_name>/X11R6 install

Where the stow scheme breaks down is if the package Makefile does not support --prefix for the install.

So as you can see for removal of packages, one just goes to /usr/local/stow and does a

stow -D package_name

That removes all the symbolic links and then one can

rm -fr package_name

and no detritus is left behind.

No database to worry about being corrupted, and you can easily see what packages you have installed from the directory listing of /usr/local/stow.

And obviously you can pick and choose which information (README, HOWTO etc) files you want to keep under the share/doc/package_name directory.

And do not forget that on a stable installation, apart from updates, /usr should be mounted ro for security purposes, which means that /usr/local can be left mounted rw for installating and trying out non distribution packaged software.

Once i got into the discipline of using it, it made life so much easier in terms of controlling what non-distribution software was installed on my machine.

Last edited by Corin; 08-05-2003 at 09:51 PM.
 
Old 08-06-2003, 01:07 PM   #13
tincat2
Member
 
Registered: Feb 2002
Location: hills of WV
Distribution: slackware
Posts: 223

Rep: Reputation: 30
this whole page should be a howto of some sort-certainly a "page of note" on fonts. thank all of you guys for providing not only a wealth of content and food for thought, but an excellent example of the intelligent expansion of discussion on a topic-it's why i send my friends here.
 
Old 09-07-2003, 09:35 AM   #14
Carpo
Member
 
Registered: Aug 2003
Location: Somewhere
Distribution: Gentoo (for now)
Posts: 364

Rep: Reputation: 30
Hi

im having a bit of a prob getting some fonts to install (and yes i am a n00b to linux ) but after this guide i keep getting the same error wether i install using this guide or thru kdes font installer - which crashes out
the fault i keep getting is when i do

/usr/X11R6/bin/fc-cache

i get the error - segmentation fault
when i reboot i get this error line pop up

/etc/rc.d/rc.M line 91: 1201 Segmentation fault

when looking at that file and the line it says there is a prob at all the is is fi

im prob doing something wrong or over looking something, but anyone knkow how to solve this little prob?

Thanks
 
Old 09-07-2003, 08:47 PM   #15
Rodrin
Member
 
Registered: May 2003
Location: Upstate NY, U.S.
Distribution: Slackware
Posts: 248

Rep: Reputation: 31
The most likely problem I can think of is that one of the True Type fonts you are trying to install is corrupted or doesn't properly match up to the specifications for True Type fonts and is crashing fc-cache when it tries to scan it. If this is the case, you will probably have to remove the fonts you are trying to install from the font directory you are putting them in and see if that fixes the problem. If it does, you could try putting the fonts back in one by one to see which is problematic and perhaps try downloading it again and/or just forgetting about trying to get it to work if it is a poorly engineered font.

Another possibility is if you edited your /etc/fonts/fonts.config or your /etc/fonts/fonts.local that you accidentally inserted some kind of syntax error which is causing fc-cache to crash.
 
  


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
Help - it's driving me nuts! n4ogl Linux - Newbie 4 11-13-2005 09:28 PM
Yast is driving me nuts! brianthegreat SUSE / openSUSE 16 10-31-2005 10:15 AM
Driving me nuts!! jappstam12345 Linux - Newbie 7 03-11-2005 05:51 PM
This is driving me nuts! dareino Fedora 4 06-30-2004 02:17 AM
driving me nuts!!! ihatebillgates Linux - Newbie 6 12-12-2003 07:03 AM

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

All times are GMT -5. The time now is 05:03 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration