Unix Technical Forum

Installing TTF fonts

This is a discussion on Installing TTF fonts within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Ok, i've tried searching, but I can't find anything recent enough to actually be useful (as in the commands ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 11:31 AM
MaskedSlacker
 
Posts: n/a
Default Installing TTF fonts

Ok, i've tried searching, but I can't find anything recent enough to
actually be useful (as in the commands I'm told to use don't exist
anymore in 10.2, like ttmkfdir).

So is there any useful resource on how to install TTF fonts in slackware
(or even linux in general)?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 11:31 AM
joe
 
Posts: n/a
Default Re: Installing TTF fonts

MaskedSlacker wrote:

> Ok, i've tried searching, but I can't find anything recent enough
> to actually be useful (as in the commands I'm told to use don't
> exist anymore in 10.2, like ttmkfdir).
>
> So is there any useful resource on how to install TTF fonts in
> slackware (or even linux in general)?


See http://brendan.sdf-eu.org/articles/a...sing_slack.php - the
first part of this article shoul be of help to you. Note that
Slack 10.2 has the TTF fonts in /usr/X11R6/lib/X11/fonts/TTF - so
amend the font path accordingly.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 11:31 AM
Frits
 
Posts: n/a
Default Re: Installing TTF fonts

MaskedSlacker wrote:
> Ok, i've tried searching, but I can't find anything recent enough to
> actually be useful (as in the commands I'm told to use don't exist
> anymore in 10.2, like ttmkfdir).
>
> So is there any useful resource on how to install TTF fonts in slackware
> (or even linux in general)?


You could try this, go to http://corefonts.sourceforge.net/
then
1- go to "just the fonts"
2- click "here"
3- download cabextract-06-1.i386.rpm and all the .exe files
4- if you use slackware then first do:
rpm2tgz cabextract-0.6-1.i386.rpm
5-as root using pkgtool you can install cabextract now
6-from the location where you have the downloaded .exe files do the
following: cabextract -L -d /usr/X11R6/lib/X11/fonts/truetype *
maybe you want another location, -do not forget the *

You could also take alook here:
http://dejavu.sourceforge.net/wiki/index.php/Main_Page







Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 11:31 AM
Thomas Ronayne
 
Posts: n/a
Default Re: Installing TTF fonts

MaskedSlacker wrote:

> Ok, i've tried searching, but I can't find anything recent enough to
> actually be useful (as in the commands I'm told to use don't exist
> anymore in 10.2, like ttmkfdir).
>
> So is there any useful resource on how to install TTF fonts in
> slackware (or even linux in general)?


Assuming you have a bunch of TTF font files (from wherever you got
them), it's pretty easy:

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 11:32 AM
Olive
 
Posts: n/a
Default Re: Installing TTF fonts

Thomas Ronayne wrote:
> MaskedSlacker wrote:
>
>> Ok, i've tried searching, but I can't find anything recent enough to
>> actually be useful (as in the commands I'm told to use don't exist
>> anymore in 10.2, like ttmkfdir).
>>
>> So is there any useful resource on how to install TTF fonts in
>> slackware (or even linux in general)?

>
>
> Assuming you have a bunch of TTF font files (from wherever you got
> them), it's pretty easy:
>
> 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.


You have also to add the new directory in /etc/fonts/fonts.conf in order
that the fonts are visible to program using the freetype library

Olive
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 11:32 AM
Joost Kremers
 
Posts: n/a
Default Re: Installing TTF fonts

Olive wrote:
> You have also to add the new directory in /etc/fonts/fonts.conf in order
> that the fonts are visible to program using the freetype library


cool, now i finally know why my gtk2 programs couldn't see my ttf fonts.

--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 11:33 AM
Mounir AITTAHAR
 
Posts: n/a
Default Re: Installing TTF fonts

> 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 can add this in the beginning of /etc/fonts/fonts.conf (or in
local.conf if it works, it will no be overriden at the next update of xorg)

<dir>/usr/X11R6/lib/X11/fonts/TTF</dir>
<dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
<dir>~/.fonts</dir>

Then,
> fc-cache
> That's it.

Now, ok

--
Mounir AITTAHAR
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-20-2008, 11:33 AM
Thomas Ronayne
 
Posts: n/a
Default Re: Installing TTF fonts



Olive wrote:

> You have also to add the new directory in /etc/fonts/fonts.conf in
> order that the fonts are visible to program using the freetype library
>
> Olive


You know, I've never had to do that -- I add the fonts (TTF, Adobe,
PostScript) whenever I do an install then run xorgsetup and it seems to
find all of them and does its thing (or maybe not) but everything I use
(Firefox, Mozilla, OpenOffice and other things) seem to find the TTF
files without a problem.

So I'll add that to /etc/fonts/fonts.conf and see what happens.

Hmm, learn something every day.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-20-2008, 11:47 AM
Niki Kovacs
 
Posts: n/a
Default Re: Installing TTF fonts

MaskedSlacker wrote:

> Ok, i've tried searching, but I can't find anything recent enough to
> actually be useful (as in the commands I'm told to use don't exist
> anymore in 10.2, like ttmkfdir).
>
> So is there any useful resource on how to install TTF fonts in slackware
> (or even linux in general)?


Hell is paved with good intentions, a french saying goes. Which means that
many people will guide you to some hairpulling-type experience by answering
you. Let's avoid this:

# mkdir /usr/share/fonts

Copy all your .ttf files into that directory, and then:

# fc-cache -f -v

Your TTF fonts are ready to use, and you don't even need to restart your x
server (nor, God forbid, rebootD).

Cheers,

Niki Kovacs
--
I'm not as think as you stoned I am.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:18 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com