You are not logged in.

#1 2004-04-27 10:28:42

mctavish
Member
From: Australia
Registered: 2004-03-22
Posts: 48

making ttf fonts available

G'day,

In my quest for nice fonts I have installed ttf-ms-fonts, and that has fixed up my fonts in firefox and thunderbird nicely.

My problem is that these fonts aren't available to apps such as nedit.

I have tried adding the font paths to my XF86Config like so:

    FontPath   "/usr/X11R6/lib/X11/fonts/TTF"
    FontPath   "/usr/X11R6/lib/X11/fonts/ttf-ms-fonts"

But this doesn't seem to work. My XF86 log contains this:

Could not init font path element /usr/X11R6/lib/X11/fonts/TTF
Could not init font path element /usr/X11R6/lib/X11/fonts/ttf-ms-fonts

I've tried a couple of things like reinstalling the ttf package, trying to regenerate the font cache, etc but when it comes down to it I know nothing about fonts really so there is probably an easy solution.

Any ideas?

Offline

#2 2004-04-27 14:19:07

matias
Member
Registered: 2004-04-11
Posts: 42

Re: making ttf fonts available

First, change it to:

    FontPath   "/usr/X11R6/lib/X11/fonts/TTF/"
    FontPath   "/usr/X11R6/lib/X11/fonts/ttf-ms-fonts/"

Then, as root:
# fc-cache -fv

That's all (I think, not sure)

Offline

#3 2004-04-27 18:06:32

colnago
Member
From: Victoria, BC
Registered: 2004-03-25
Posts: 438

Re: making ttf fonts available

you could try removing (renaming) the fonts.cache file in those directories (fc-cache -fv from matias' post will regenerate) too

Offline

#4 2004-04-28 08:46:01

mctavish
Member
From: Australia
Registered: 2004-03-22
Posts: 48

Re: making ttf fonts available

Thanks for your replies, guys.

Well yes, the tailing slash for my fontpaths was something I missed!

But even after fixing that up, running # fc-cache -fv, and even deleting the fonts.cache file then regenerating the cache, no luck.

Looking at all the relevant config files inside the font directories such as fonts.cache and fonts.dir, I can't see anything suspicious. They look much the same as those in other directories.

This might give somebody a hint though:

[root@mctav mctavish]# xset fp+ /usr/X11R6/lib/X11/fonts/TTF/
xset:  bad font path element (#54), possible causes are:
    Directory does not exist or has wrong permissions
    Directory missing fonts.dir
    Incorrect font server address or syntax

Ownership and permissions for TTF and ttf-ms-fonts directories don't look any different to others that work, and the fonts.dir directories are definitely there. I don't know enough about the font server to know if there is a problem there.

I've googled for answers, but no luck.

Ah, the sweet mysteries!

Offline

#5 2004-04-28 09:19:46

mctavish
Member
From: Australia
Registered: 2004-03-22
Posts: 48

Re: making ttf fonts available

I should probably add that the # fc-cache -f command looked ok when it ran -
fc-cache: "/usr/X11R6/lib/X11/fonts/TTF": caching, 21 fonts, 0 dir
fc-cache: "/usr/X11R6/lib/X11/fonts/ttf-ms-fonts": caching, 30 fonts, 0 dirs

-but didn't seem to fix my problem.

Also, the applications that I am failing to see the fonts in are nedit, and treepad (a neat little heirarchical organizer). Firefox and Thunderbird apps successfully make use of these new fonts.

Offline

#6 2004-04-29 08:05:33

mctavish
Member
From: Australia
Registered: 2004-03-22
Posts: 48

Re: making ttf fonts available

Aha, I wasn't loading the "freetype" font module in XF86Config.

Problem solved. Thanks to colnago and matias for responding.

The new fonts look a bit rough, but seeing if I can fix that is my next project! I suspect it is antialiasing or something.

Offline

#7 2004-07-30 12:41:09

beniro
Member
From: St. Petersburg, FL, USA
Registered: 2002-12-31
Posts: 313

Re: making ttf fonts available

How did you load the freetype module?

I think I may be experiencing this problem...

Offline

#8 2004-07-30 19:51:40

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: making ttf fonts available

The freetype module has to be loaded in your X config in /etc/X11/ (depends on which x package you are using). Under Section "Module" add Load "freetype" (if you don't have it already) and restart your x session.

I must say that even with this I'm experiencing disappearing of ms ttf fonts from time to time (after fc-cache -fv and everything...) - it's very strange - some applications can use these fonts and some (gtk1 for sure) just can't. I'm still not sure which of the strange actions I'm usually doing in this situation (including reboot :-)) brings them back. The fonts are also not visible in xfontsel application. Next time I'll have to spend more time on investigating this...

Offline

#9 2004-07-31 06:59:45

tpowa
Developer
From: Lauingen , Germany
Registered: 2004-04-05
Posts: 2,322

Re: making ttf fonts available

Offline

Board footer

Powered by FluxBB