LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-12-2006, 09:44 PM   #1
asilentmurmur
Member
 
Registered: Mar 2005
Location: Washington DC area
Posts: 214

Rep: Reputation: 30
how do i install TTF fonts on fluxbox?


Hi Everyone.

I am currently running slackware 10.2 with Fluxbox as my windows manager. How do I go about installing Truetype fonts on this system? I would like to be able to use the fonts in my FONTS folder on my NTFS partition (Windows XP).

Also, does Slackware 10.2 support *.fon fonts? Ive noticed that many of the fonts in the FONTS folder of Windows XP (I am using international language support) contain fonts with the extension *.fon

Does linux support this? What steps do I have to go thru to successfully install TTF fonts on Slackware Linux 10.2 with fluxbox?
 
Old 07-13-2006, 12:29 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,941

Rep: Reputation: 129Reputation: 129
TrueType fonts have the .ttf extension. Easiest thing to do for Fluxbox is issue as root "mkdir /usr/share/fonts" and copy them from your Windoze partition to there. Then run "fc-cache" as root. You might need the full path; if so issue "whereis fc-cache" and you should get it. Or when you reboot, fc-cache will run unless you've commented it in /etc/rc.d/rc.M yourself.

For info on what .fon fonts are, use Google. IIRC those are Windoze bitmap fonts.

Last edited by Bruce Hill; 07-13-2006 at 12:31 AM.
 
Old 07-13-2006, 01:07 AM   #3
uselpa
Senior Member
 
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507

Rep: Reputation: 47
Maybe this helps. There's no difference if you use Fluxbox, KDE or XFCE so these instructions apply to you.
 
1 members found this post helpful.
Old 07-13-2006, 03:25 AM   #4
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Rep: Reputation: 63
this thread here might help you to..

http://www.linuxquestions.org/questi...d.php?t=462034
 
1 members found this post helpful.
Old 07-13-2006, 07:05 AM   #5
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
The fonts are made available to the window manager from X; you install them like this:

log in as root (or su or whatever)
cd directory-where-TTF-files-are
# create the target directory if it doesn't already exist
mkdir -p /usr/X11R6/lib/X11/fonts/TTF
# copy all the TTF files, changing the name to lower case as you go
for file in *.[Tt][Tt][Ff]
do
cp ${file} /usr/X11R6/lib/X11/fonts/TTF/`echo ${file} | tr [A-Z]
[a-z]`
done
# go to the directory you just copied all that stuff to
cd /usr/X11R6/lib/X11/fonts/TTF
# if you got them from winders, change the mode of the files
chmod 644 *
# create the fonts.dir and fonts.scale files you need
mkfontdir
mkfontscale
# you should have files fonts.dir and fonts.scale, look at 'em if
you want

Now you need to add the font path to /etc/X11/xorg.conf; in the section "Files," add this line:

FontPath "/usr/X11R6/lib/X11/fonts/TTF/"

That section of my xorg.conf file looks like this:

Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
ModulePath "/usr/X11R6/lib/modules"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/TTF/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/myfonts/"
# FontPath "/usr/X11R6/lib/X11/fonts/CID/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection

You need to exit from X (if it's running) and execute

fc-cache /usr/X11R6/lib/X11/fonts/TTF

That's it.
 
1 members found this post helpful.
Old 07-13-2006, 05:40 PM   #6
asilentmurmur
Member
 
Registered: Mar 2005
Location: Washington DC area
Posts: 214

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by tronayne
The fonts are made available to the window manager from X; you install them like this:

log in as root (or su or whatever)
cd directory-where-TTF-files-are
# create the target directory if it doesn't already exist
mkdir -p /usr/X11R6/lib/X11/fonts/TTF
# copy all the TTF files, changing the name to lower case as you go
for file in *.[Tt][Tt][Ff]
do
cp ${file} /usr/X11R6/lib/X11/fonts/TTF/`echo ${file} | tr [A-Z]
[a-z]`
done
# go to the directory you just copied all that stuff to
cd /usr/X11R6/lib/X11/fonts/TTF
# if you got them from winders, change the mode of the files
chmod 644 *
# create the fonts.dir and fonts.scale files you need
mkfontdir
mkfontscale
# you should have files fonts.dir and fonts.scale, look at 'em if
you want

Now you need to add the font path to /etc/X11/xorg.conf; in the section "Files," add this line:

FontPath "/usr/X11R6/lib/X11/fonts/TTF/"

That section of my xorg.conf file looks like this:

Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
ModulePath "/usr/X11R6/lib/modules"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/TTF/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/myfonts/"
# FontPath "/usr/X11R6/lib/X11/fonts/CID/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection

You need to exit from X (if it's running) and execute

fc-cache /usr/X11R6/lib/X11/fonts/TTF

That's it.
will this advise work with the *.fon fonts that are in the windows XP font folder? Those are bitmap fonts something like that.
 
Old 07-13-2006, 05:54 PM   #7
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Perhaps this will help:

Installing TrueType Fonts on GNU/Linux
 
Old 07-13-2006, 05:57 PM   #8
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Unknown, Cap'n... but, you've got enough bitmap fonts in the distribution to drown a cat -- add the TTF's and be a happy camper.
 
Old 07-13-2006, 08:17 PM   #9
asilentmurmur
Member
 
Registered: Mar 2005
Location: Washington DC area
Posts: 214

Original Poster
Rep: Reputation: 30
how do i convert all the file names to lowercase? is there a special command i can use?
 
Old 07-14-2006, 01:15 AM   #10
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,941

Rep: Reputation: 129Reputation: 129
I think you'll find that 'just happens' when you copy them. I never did it on purpose, and all of mine are .ttf -- but then, I'm a simple Redneck whom God loves and blesses -- He fixes many of my mistakes for me.
 
Old 07-14-2006, 02:28 AM   #11
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Rep: Reputation: 63
maybe that rename program at linuxpackages can help, not being a wiseguy....i just never used it.
 
Old 07-14-2006, 06:22 AM   #12
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Quote:
Originally Posted by asilentmurmur
how do i convert all the file names to lowercase? is there a special command i can use?
Easiest way is while you're copying from wherever to, say, /usr/X11R6/lib/X11/fonts/TTF:

cd <directory where .TTF files are>
# copy all the TTF files, changing the name to lower case as you go
for file in *.[Tt][Tt][Ff]
do
cp ${file} /usr/X11R6/lib/X11/fonts/TTF/`echo ${file} | tr [A-Z] [a-z]`
done

In the above you're copying FONTFILE.TTF to /usr/X11R6/lib/X11/fonts/TTF/fontfile.ttf (the "sideways pipe" -- `echo ${file} | tr [A-Z] [a-z]` -- does that). See the man page for the tr utility.
 
Old 07-14-2006, 06:48 AM   #13
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,941

Rep: Reputation: 129Reputation: 129
And besides, out of 277 fonts in my WinXP Pro, there is only one .TTF
Code:
root@silas:~# ls -lh /WinXP/WINDOWS/Fonts/*.TTF
-r-------- 1 root root 45K 1999-04-24 05:22 /WinXP/WINDOWS/Fonts/FELIXTI.TTF
and it didn't come with Windows anyway. The remaining 276 are all .fon or .ttf.
 
  


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
TTF Fonts huno Linux - Software 5 12-22-2006 10:38 PM
Ubuntu Dapper - install ttf fonts? jz32300 Linux - Newbie 3 06-25-2006 04:07 AM
Adding TTF fonts from an existing Windows install... Eerath MEPIS 2 09-03-2005 05:00 AM
TTF Fonts XPediTioN Slackware 8 08-16-2003 07:38 PM
Any way to convert ttf fonts to linux console fonts? Glockage Linux - Software 7 12-30-2002 06:41 AM

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

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