Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to install TrueType fonts on slack?

465 views
Skip to first unread message

Steven Woody

unread,
Apr 17, 2008, 10:43:39 PM4/17/08
to
By google-ing, I got a paper to read, it said I need a tool
`ttmkfdir', but there is no such a thing in my 12.0 slack. So I go to
download the source package of ttmkfdir, but compiling failed. So,
what's the correct way to install TrueType fonts?

Thanks.

Dave Uhring

unread,
Apr 17, 2008, 11:05:56 PM4/17/08
to

http://corefonts.sourceforge.net/

You should have rpm installed. Just get the DeadRat package and install
it. Hint: http://rpmfind.net

D Herring

unread,
Apr 17, 2008, 11:28:43 PM4/17/08
to

No fancy tools needed. Freetype2 is able to use TTF fonts directly.

If you happen to use KDE, open the control center, select System
Administration, Font Installer, and select Add Fonts. This will
install fonts in your home directory; choosing Administrator Mode will
put them in a system directory.

If not, pick a FontPath from /etc/X11/xorg.conf (e.g.
/usr/share/fonts/TTF), copy your ttf files there, and then run
fc-cache as root. Then fc-list should show the new fonts. You may
have to restart your applications for them to get the new fonts.

Or something like that.

- Daniel

Steven Woody

unread,
Apr 18, 2008, 3:42:22 AM4/18/08
to

Hi, Daniel

put in /usr/share/fonts/TTF and run fc-cache is done and successed,
but I have a few more questions:

1, /usr/share/fonts/TTF is not listed as FontPath in my xorg.conf,
how X fond it?
2, I added my own path /usr/local/share/fonts/TTF as FontPath in
xorg.conf and run fc-cache as usually, but this did not work. Why?

Thank you for help.

-
woody

Steven Woody

unread,
Apr 18, 2008, 4:21:15 AM4/18/08
to
On Apr 18, 11:28 am, D Herring <dherr...@at.tentpost.dot.com> wrote:


Hi, Daniel

Copy ttf to /usr/share/fonts/TTF works and I see the name in the fc-
list results. And, I have two more question to ask

1) If I copy ttf to my own path /usr/local/share/fonts/TTF and add an
FontPath entry in xorg.conf then run fc-cache, it did not work. Why?
No error, but no expected font listed by fc-list.

2) /usr/share/fonts/TTF actually is not in xorg.conf. How X found
it? A built-in default?

Glyn Millington

unread,
Apr 18, 2008, 4:16:47 AM4/18/08
to
Steven Woody <narke...@gmail.com> writes:

> 1, /usr/share/fonts/TTF is not listed as FontPath in my xorg.conf,
> how X fond it?
> 2, I added my own path /usr/local/share/fonts/TTF as FontPath in
> xorg.conf and run fc-cache as usually, but this did not work. Why?
>

Not sure! Depends what you mean by "did not work" !

The recipe I use is this:-


1. Put the fonts in /usr/share/fonts/TTF
2. Run mkfontscale and mkfontdir in that directory
3. Make sure that your TTF directory is in th font-path in xorg.conf
4. Run fc-cache
5. Re-start X

It works here at any rate!

atb


Glyn
--
RTFM http://www.tldp.org/index.html
GAFC http://slackbook.org/ The Official Source :-)
STFW http://groups.google.com/groups?hl=en&group=alt.os.linux.slackware
JFGI http://jfgi.us/

Joost Kremers

unread,
Apr 18, 2008, 6:20:19 AM4/18/08
to
Dave Uhring wrote:
> http://corefonts.sourceforge.net/
>
> You should have rpm installed.

IIRC you don't need rpm but cabextract, which AFAIK doesn't come with
slackware, but it's easily found on google and compiles without problems.

> Just get the DeadRat package and install
> it. Hint: http://rpmfind.net

slackware comes with rpm in the ap series.


--
Joost Kremers joostk...@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)

Dave Uhring

unread,
Apr 18, 2008, 9:31:16 AM4/18/08
to
On Fri, 18 Apr 2008 10:20:19 +0000, Joost Kremers wrote:
> Dave Uhring wrote:

>> You should have rpm installed.
>
> IIRC you don't need rpm but cabextract, which AFAIK doesn't come with
> slackware, but it's easily found on google and compiles without
> problems.

The OP is probably copying the fonts from his windows installation, hence
has no need for cabextract.

Use rpm to install ttmkfdir. ttmkfdir, not rpm. The OP complained that
he could not find ttmkfdir.

>> Just get the DeadRat package and install
>> it. Hint: http://rpmfind.net
>
> slackware comes with rpm in the ap series.

Which can be used to install ttmkfdir.

Beej Jorgensen

unread,
Apr 18, 2008, 10:24:48 AM4/18/08
to
Steven Woody <narke...@gmail.com> wrote:
>2) /usr/share/fonts/TTF actually is not in xorg.conf. How X found
>it? A built-in default?

There are so many font systems, I can't claim to know what's going on.
But these paths are found in /etc/fonts/fonts.conf:

<!-- Font directory list -->

<dir>/usr/share/fonts/OTF</dir>
<dir>/usr/share/fonts/TTF</dir>
<dir>/usr/share/fonts/Type1</dir>
<dir>/usr/share/fonts/Speedo</dir>
<dir>/usr/share/fonts/cyrillic</dir>
<dir>/usr/share/fonts/misc</dir>
<dir>~/.fonts</dir>

When I get a new TTF file, I just drop it in my ~/.fonts directory
(since I don't bother to let others use this machine) and it's ready for
use.

-Beej

Jeffrey Froman

unread,
Apr 18, 2008, 11:46:49 AM4/18/08
to
Steven Woody wrote:

> So,
> what's the correct way to install TrueType fonts?

Others have already explained the manual procedure for install fonts in
general. I'll just add that for the lazy, KDE makes adding fonts brainless:

1. Visit fonts:/ in konqueror
2. Drag and drop the new fonts into your System or Personal fonts folder.

Done!

--
Jeffrey

Damjan

unread,
Apr 18, 2008, 2:25:54 PM4/18/08
to
> 1) If I copy ttf to my own path /usr/local/share/fonts/TTF and add an
> FontPath entry in xorg.conf then run fc-cache, it did not work. Why?
> No error, but no expected font listed by fc-list.
>
> 2) /usr/share/fonts/TTF actually is not in xorg.conf. How X found
> it? A built-in default?

The font paths set in xorg.conf are not used by any of the contemporary
Linux programs. That settings are for old school X font system (server
side). "mkfontscale", "mkfontdir", "ttmkfdir" are all tools for that
system.


All new Linux programs (GTK, Qt, etc. etc.) use the fontconfig/XFT system
(client side). The font glyphs are rendered mostly inside the app with the
help of the XRender X extension. This allows for antialised fonts an better
control and quality of the text.

The configuration for fontconfig/xft is in /etc/fonts/ and in
~/.fonts.conf . The former is system wide, the latter is per-user and is
ussually set via KDE's or Gnome's configuration tools. fc-cache and fc-list
are the tools you need (fc = fontconfig).


so to sumarize, if "fonts in Linux" is the question:
xorg.conf, "mkfontscale", "mkfontdir", "ttmkfdir" =>
old school, nobody needs them
/etc/fonts/*, ~/.fonts.conf, fc-cache, fc-list =>
the way to go


--
damjan

0 new messages