Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-12-2006, 09:44 PM
|
#1
|
Member
Registered: Mar 2005
Location: Washington DC area
Posts: 214
Rep:
|
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?
|
|
|
07-13-2006, 12:29 AM
|
#2
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,941
Rep:
|
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.
|
|
|
07-13-2006, 01:07 AM
|
#3
|
Senior Member
Registered: Oct 2004
Location: Luxemburg
Distribution: Slackware, OS X
Posts: 1,507
Rep:
|
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.
|
07-13-2006, 03:25 AM
|
#4
|
Senior Member
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519
Rep:
|
|
|
1 members found this post helpful.
|
07-13-2006, 07:05 AM
|
#5
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
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.
|
07-13-2006, 05:40 PM
|
#6
|
Member
Registered: Mar 2005
Location: Washington DC area
Posts: 214
Original Poster
Rep:
|
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.
|
|
|
07-13-2006, 05:54 PM
|
#7
|
Senior Member
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482
|
|
|
|
07-13-2006, 05:57 PM
|
#8
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
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.
|
|
|
07-13-2006, 08:17 PM
|
#9
|
Member
Registered: Mar 2005
Location: Washington DC area
Posts: 214
Original Poster
Rep:
|
how do i convert all the file names to lowercase? is there a special command i can use?
|
|
|
07-14-2006, 01:15 AM
|
#10
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,941
Rep:
|
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.
|
|
|
07-14-2006, 02:28 AM
|
#11
|
Senior Member
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519
Rep:
|
maybe that rename program at linuxpackages can help, not being a wiseguy....i just never used it.
|
|
|
07-14-2006, 06:22 AM
|
#12
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
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.
|
|
|
07-14-2006, 06:48 AM
|
#13
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,941
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 06:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|