Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Set up fonts for a KDE system
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Cloney
n00b
n00b


Joined: 10 Oct 2003
Posts: 65

PostPosted: Tue Jan 27, 2004 2:41 pm    Post subject: HOWTO: Set up fonts for a KDE system Reply with quote

EDIT: Updated with Xfs being used to generate nice scale files, then consigned to the bin.

Right, this has taken me approximately ages to get perfect.

Firstly, if you use nVidia, you may get crazy distorted fonts. For some people this is only in GTK apps, for some people it effects KDE too. This can be easily fixed by editing your XF86Config and adding the following line to the "Monitors" section:

Code:
Option "NoDDC" "true"


Next, we need some more truetype fonts:

Code:
ACCEPT_KEYWORDS='~x86' emerge corefonts
emerge sharefonts freefonts


This installs the MS core TrueType fonts, along with the Gimp fontsets.

The next step is to set up XFS, the X Font Server. We're not going to actually use it, but it's a handy way of automating the generation of .scale files and other things required by X.

Edit /etc/X11/fs/config. There's a section that catalogues all the various banks of fonts installed on your system. Add to the bottom of this list:

Code:
/usr/share/fonts/corefonts,
/usr/share/fonts/freefont


Now start up XFS. It'll catalogue the directories, then return control. Then stop it; it's work is done.

Code:
/etc/init.d/xfs start
/etc/init.d/xfs stop


Now we need to edit the fontpath settings in XF86Config so they include all the fontpaths that were in your XFS setup. Then save, and we should be ready to roll.

Fire X back up, and things should look very pretty indeed. Some KDE fonts that were previously reasonable sizes may now seem too small - fix this by changing the relevant settings (it was desktop and Konquerer settings for me). If you want anti-aliasing, turn it on in Kontrol Centre.

Getting to the end! Next step is to stop GTK2 apps looking awful. We'll need gtk-theme-switch for this.

Code:
emerge gtk-theme-switch
switch2


Now choose a GTK+ theme, then hit the plus to the right of the selection box. You can now specify a default font - for maximum consistency, I recommend Helvetica 12pt.

Next, edit /etc/fonts/local.conf, and add the following:

Code:
<dir>/usr/share/fonts</dir>


This makes all freetype apps aware of the corefonts. Thanks to crweb on #gentoo for this. This may make the next step unnecessary - YMMV.

The last step is to make OpenOffice aware of your newly installed Fonts. Fire up OpenOffice Printer Administration, then click the font button, then point it at the corefonts directory, hit select all, then hit add. oowriter etc should now be able to see the full set of MS fonts.

Your system should now look positively beautiful. It's so good to have Verdana back for IRC usage.

Cloney


Last edited by Cloney on Thu Feb 05, 2004 5:18 pm; edited 2 times in total
Back to top
View user's profile Send private message
maxilion
n00b
n00b


Joined: 19 Jun 2002
Posts: 34
Location: Belgium

PostPosted: Tue Jan 27, 2004 3:18 pm    Post subject: Reply with quote

Tnx, great howto!

Sam
Back to top
View user's profile Send private message
Jux
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2004
Posts: 103
Location: Austria

PostPosted: Tue Jan 27, 2004 6:02 pm    Post subject: Thank you Reply with quote

Perfect timing.
In the morning I intended to search a font-howto this evening - here it is.

Great work, Jux
Back to top
View user's profile Send private message
JuNix
Apprentice
Apprentice


Joined: 05 Mar 2003
Posts: 214
Location: Sheffield

PostPosted: Tue Jan 27, 2004 11:09 pm    Post subject: Reply with quote

Alright! That worked superbly, and 12 point fonts are really 12 point instead of being huge. Great how to, cheers!
Back to top
View user's profile Send private message
leandro
Tux's lil' helper
Tux's lil' helper


Joined: 08 Dec 2003
Posts: 124
Location: São Paulo, Brazil

PostPosted: Thu Jan 29, 2004 3:19 am    Post subject: Reply with quote

Thank you very much!
Didn't know about the NoDDC option.. :)
Back to top
View user's profile Send private message
MaGuS
Guru
Guru


Joined: 13 Jun 2002
Posts: 303
Location: Luebeck, Germany

PostPosted: Wed Feb 04, 2004 4:58 am    Post subject: Reply with quote

Hi,

I added
Code:
FontPath     "unix/:-1"
to my X config and removed all other FontPath lines. No my x server won't come up. xfs is running.

Anybody knows why?

Best regards,
Magnus
Back to top
View user's profile Send private message
Drewgrange
Guru
Guru


Joined: 29 Mar 2003
Posts: 483
Location: Ohio, US

PostPosted: Wed Feb 04, 2004 5:20 am    Post subject: Reply with quote

Thanks for the how-to, but I'm just curious about one thing. Does doing this through XFS have any advantage over just installing the fonts and adding the path to the xf86config file?
Back to top
View user's profile Send private message
Drewgrange
Guru
Guru


Joined: 29 Mar 2003
Posts: 483
Location: Ohio, US

PostPosted: Wed Feb 04, 2004 5:23 am    Post subject: Reply with quote

Magus, does it give any errors? Check /var/log/XFree86.0.log Also could you post that top section of your xf86config file?
Back to top
View user's profile Send private message
MaGuS
Guru
Guru


Joined: 13 Jun 2002
Posts: 303
Location: Luebeck, Germany

PostPosted: Wed Feb 04, 2004 5:33 am    Post subject: Reply with quote

Drewgrange wrote:
Magus, does it give any errors? Check /var/log/XFree86.0.log Also could you post that top section of your xf86config file?


No nothing, but I just removed all FonPath lines and all work great!

Magnus
Back to top
View user's profile Send private message
Cloney
n00b
n00b


Joined: 10 Oct 2003
Posts: 65

PostPosted: Wed Feb 04, 2004 9:56 am    Post subject: Reply with quote

Drewgrange wrote:
Thanks for the how-to, but I'm just curious about one thing. Does doing this through XFS have any advantage over just installing the fonts and adding the path to the xf86config file?


Actually, after some experimentation, I'm not sure it does. I've switched to a non-XFS system.

I'll update the FAQ soon with a bit about turning off anti-aliasing in XFT for fonts in the range 8-15 points.

Cloney
Enjoying KDE 3.2
Back to top
View user's profile Send private message
Plasmaisme
n00b
n00b


Joined: 03 Dec 2003
Posts: 5

PostPosted: Wed Feb 04, 2004 11:47 am    Post subject: Reply with quote

Wow, thanks for the tips! My fonts now look fantastic. Before, all my fonts were basically always one-pixel thick, which while utilitarian, isn't all that fancy, and antialiasing seemed to have no effect. Now, I'm using Times New Roman with antialiasing (for all font sizes), and it's FANTASTIC.

Up until now, this was the only thing from my long-gone Mandrake days which I couldn't replicate in Gentoo, but now that I have this, my setup is complete (well, I could go for the old-style Mosfet Liquid theme, but it's not available for KDE 3.2). So thanks again!
Back to top
View user's profile Send private message
triad
Apprentice
Apprentice


Joined: 10 Jul 2003
Posts: 234
Location: Dark Side of the Moon

PostPosted: Wed Feb 04, 2004 4:10 pm    Post subject: Reply with quote

Finally a Nice straight Forward Guide to Fonts!

Thanks a million Cloney!

triad
_________________
It's not the size of your processor that matters... But how you use it!
Back to top
View user's profile Send private message
Dolio
l33t
l33t


Joined: 17 Jun 2002
Posts: 650

PostPosted: Wed Feb 04, 2004 7:53 pm    Post subject: Reply with quote

Hi.

I took your advice with the NoDCC (like you, I can't seem to tell a difference between XFS and no-XFS, so I'm just using regular font paths), and everything looks fine for the most part.

However, in Firebird and Thunderbird, all the fonts in the menubars and such are very tiny, and I can't seem to figure out how to change them. I thought they went according to the browser page fonts, but they don't seem to, and changing my GTK font doesn't seem to work either.

Does anyone know what setting (say in about:config) Mozilla et-al use for the menu drawing so I can fix this? Actual fonts in the web pages are fine.

Thanks in advance.
_________________
They don't have a good bathroom to do coke in.
Back to top
View user's profile Send private message
Dolio
l33t
l33t


Joined: 17 Jun 2002
Posts: 650

PostPosted: Wed Feb 04, 2004 8:45 pm    Post subject: Reply with quote

Never mind. Found the answer.

In case anyone's interested, you need to edit your ~/.thunderbird/default/RANDOM_LETTERS.slt/chrome/

or .phoenix, as necessary to include the followng:

Code:
* {
    font-size: 12pt !important;
}


Or whatever font size you want. That should work.
_________________
They don't have a good bathroom to do coke in.
Back to top
View user's profile Send private message
EugeneTSWong
n00b
n00b


Joined: 18 Sep 2003
Posts: 45

PostPosted: Thu Feb 05, 2004 2:54 am    Post subject: Reply with quote

Hi all. I looked in spadmin, & found that the fonts all end in ttf. Doesn't that mean that I don't need to install these other fonts?

Also, what happens when other people read my documents, & don't have the fonts installed? Doesn't it look really messy?
_________________
Sincerely, & with thanks,
Eugene T.S. Wong
Back to top
View user's profile Send private message
Cloney
n00b
n00b


Joined: 10 Oct 2003
Posts: 65

PostPosted: Thu Feb 05, 2004 12:45 pm    Post subject: Reply with quote

Dolio wrote:
I took your advice with the NoDCC (like you, I can't seem to tell a difference between XFS and no-XFS, so I'm just using regular font paths), and everything looks fine for the most part.


Well, to use the fontpaths you have to have the .scale files, etc, for each directory generated. I found what worked best was using XFS to automate the generation of these files, then killing it and just plugging the directories into XF86Config. Steal the good features from both :twisted:

As for Mozilla & co, it's been driving me mad. See https://forums.gentoo.org/viewtopic.php?t=129778&highlight= for some of my experiments.

What with Konqueror being so good in KDE 3.2, I've just switched over to Konq full time, with Firebird around for backup in case of incompatiblity. I've also switched to KMail, which seemed crap at first, but is secretly quite customizable (and minimises to the sys-tray. Go team KDE!)

Cloney
Back to top
View user's profile Send private message
Ruedi1_99
n00b
n00b


Joined: 26 Jan 2004
Posts: 7

PostPosted: Fri Feb 06, 2004 8:38 am    Post subject: Reply with quote

Do I have to add the line
Code:
<dir>/usr/share/fonts</dir>

inside the </fontconfig> borders or outside?
Sometimes I get an error message about /etc/fonts/local.conf :oops:
Back to top
View user's profile Send private message
jerry arns
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2003
Posts: 95
Location: France

PostPosted: Sun Feb 08, 2004 5:07 pm    Post subject: Reply with quote

Great post. I got all the fonts I wanted. Thank you. It deserves to go in the Desktop configuration guide.

Now for the GTK theme integration.

I did as you said, I emerged gtk-theme-switch
Then I emerged gtk-engines-geramik

Then, as a normal user, I ran switch2 and was able to choose Geramik as a theme and the switch2 window switched to the theme.

So far, so good.

But none of the 2 applications I tried, MozillaFirebird and XMMS got the Geramik theme and they stay ugly.

I re-emerge xmms with +gtk2 but it made not good.

My USE flag is +kde +qt -gnome -gtk

Did I miss something ?
_________________
Left handed, right minded.
Back to top
View user's profile Send private message
Cloney
n00b
n00b


Joined: 10 Oct 2003
Posts: 65

PostPosted: Sun Feb 08, 2004 6:24 pm    Post subject: Reply with quote

jerry arns wrote:
Now for the GTK theme integration.

I did as you said, I emerged gtk-theme-switch
Then I emerged gtk-engines-geramik

Then, as a normal user, I ran switch2 and was able to choose Geramik as a theme and the switch2 window switched to the theme.

But none of the 2 applications I tried, MozillaFirebird and XMMS got the Geramik theme and they stay ugly.


Ugly as in bad fonts? When you pick a theme in switch2, you'll see a big + sign to the right of the theme name. Click this, and you can specify a font for use in all GTK2 apps. Note that these settings are only for GTK2 stuff - to emerge the original GTK switcher, switch, type the following:

Code:
emerge =gtk-theme-switch-1.0.1-r1


However, this switcher doesn't seem very stable to me. Your mileage may vary.

I've never had a problem with XMMS fonts, but I believe there are a few threads somewhere on the forums regarding tiny fonts in XMMS and Mozilla which had some kind of resolution.

Mozilla's fonts are a mystery to me, as I've mentioned further up in this post. It seems to ignore almost everything, including it's own settings. I recommend KDE 3.2 - the new Konquerer is frankly a better browser than Moz.

Cloney
Back to top
View user's profile Send private message
davekt
n00b
n00b


Joined: 07 Jun 2003
Posts: 13

PostPosted: Sun Feb 08, 2004 8:03 pm    Post subject: Reply with quote

Hmm, all I had to do to get MS core truetype fonts working was to have the 'truetype' USE var set when emerging X. When truetype is set, the Xfree ebuild installs the corefonts pkg (I've read that is why the corefonts ebuild is masked.)

Then I had to edit /etc/fonts/local.conf to add the truetype dir:

<dir>/usr/X11R6/lib/X11/fonts/truetype</dir>

Then running 'fc-cache -fv' picked up the new fonts.

I may be missing something but everything mentioned earlier in this thread seems to basically duplicate what's already done for you if you have 'truetype' set while emerging X.
Back to top
View user's profile Send private message
jerry arns
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2003
Posts: 95
Location: France

PostPosted: Sun Feb 08, 2004 9:10 pm    Post subject: Reply with quote

Cloney : fonts are OK, but scroll bars, combo boxes, etc... do not follow the theme and stay gray.
_________________
Left handed, right minded.
Back to top
View user's profile Send private message
Cloney
n00b
n00b


Joined: 10 Oct 2003
Posts: 65

PostPosted: Mon Feb 09, 2004 9:23 am    Post subject: Reply with quote

davekt wrote:
Hmm, all I had to do to get MS core truetype fonts working was to have the 'truetype' USE var set when emerging X.


A bit of investigation shows that appears to be the case to get them installed, which I didn't realise. At any rate, they're not usable until they've had scale files generated and been plumbed into XF86Config, Xft and font.conf.

Ah well, it worked for everyone in this thread, so why gripe? The fonts documentation for Gentoo seems pretty awful in general. The NoDDC and switch2 bits are news to most, anyway.

Cloney
Back to top
View user's profile Send private message
davekt
n00b
n00b


Joined: 07 Jun 2003
Posts: 13

PostPosted: Mon Feb 09, 2004 8:32 pm    Post subject: Reply with quote

Sorry, didn't mean it as a gripe, was just puzzled about the other steps and wanted to get some feedback. Some users were noting they couldn't get ttf fonts working even after using the 'truetype' in X (in other threads also). I had the same problem but tracked it down to the truetype dir not being in the fonts.conf file. Once I fixed that everything seemed to work, without doing anything else. Running fc-cache also puts the fonts.scale files in the directories (I think that's right anyway). At this point Gnome, KDE and Mozilla could all see these fonts. Wasn't trying to say one way was better or anything, just what I did to get mine to work.
Back to top
View user's profile Send private message
alexraasch
Tux's lil' helper
Tux's lil' helper


Joined: 14 Nov 2003
Posts: 94
Location: Rostock, Germany

PostPosted: Mon Feb 09, 2004 9:31 pm    Post subject: Reply with quote

I am sorry, but I have not been lucky with this guide. After having finished it I can use all of the truetype fonts, but everything looks a lot uglier than before. I had compiled X with USE="truetype" and I was quite satisfied with the overall appearance. Now, after the guide the anti-aliasing and subpixel hinting does not look as good as before. The font sizes are messed and some letters are rendered quite bolder than others.

Further, I also included the directories in /etc/fonts/local.conf as suggested, then tried the NoDDC option on and off, but nothing helped out. Is there any way to savely undo the whole procedure?

I really appreciate any help on this. Thank you.
Back to top
View user's profile Send private message
MattSharp
Apprentice
Apprentice


Joined: 15 Aug 2003
Posts: 258

PostPosted: Mon Feb 09, 2004 10:31 pm    Post subject: Reply with quote

I have followed this instructions as they apply to me. I am trying to install a new TrueType font. I copied it to the appropriate directory but TrueType fonts don't seem to show up in like configure desktop? What am I missing?

EDIT: Do I need to have truetype in my USE variables? I realize taht I don't but TTFs work in OpenOffice?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum