You are not logged in.

#1 2004-09-02 16:35:55

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

weird and annoying font issues

I really need help with my fonts.  Xfontsel and term emulators inc. aterm AND rxvt-unicode cannot find many of my fonts inc TTF and non-TTF and i do not understand why.  All my fonts are visible and useable by gtk apps.  They all appear in gtk2fontsel.

There may be some error in my xorg.conf but i find it diffcult to understand why fonts appear in some apps.

I can use some artwiz fonts in aterm but they all have huge space between the characters.  this seems weird and makes me think it must be something in my x config or other settings cos they are AL artwiz package in the usual path - if they work for most people they should work for me right?

Please help – I am getting desperate!

Here is the section of my xorg.conf:

    FontPath     "/usr/X11R6/lib/X11/fonts/truetype"
    FontPath     "/usr/X11R6/lib/X11/fonts/TTF"
    FontPath     "/usr/X11R6/lib/X11/fonts/misc:unscaled"
    FontPath     "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
    FontPath     "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
    FontPath     "/usr/X11R6/lib/X11/fonts/artwiz-fonts"
    FontPath     "/usr/X11R6/lib/X11/fonts/misc"
    FontPath     "/usr/X11R6/lib/X11/fonts/Speedo"
    FontPath     "/usr/X11R6/lib/X11/fonts/Type1"    
        FontPath     "/usr/X11R6/lib/X11/fonts/75dpi"
        FontPath     "/usr/X11R6/lib/X11/fonts/100dpi"    
    #FontPath     "/usr/X11R6/lib/X11/fonts/freefont"
    FontPath     "/usr/X11R6/lib/X11/fonts/local"
    #FontPath     "/usr/X11R6/lib/X11/fonts/sharefont"
    FontPath     "/usr/X11R6/lib/X11/fonts/util"
    FontPath     "/usr/X11R6/lib/X11/fonts/CID"
    FontPath     "/home/dibble/.fonts" 

Offline

#2 2004-09-02 16:53:23

hcman
Member
From: Missoula, MT/Zaandam, Netherla
Registered: 2003-06-10
Posts: 66

Re: weird and annoying font issues

As far as I know aterm and rxvt cannot use TTF fonts so that won't work. What other fonts do you mean?

Arjan

Offline

#3 2004-09-02 16:59:38

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: weird and annoying font issues

umm - any other font - i thought i had made that fairly clear  :?: rxvt-unicode can use TTF apparently also - i tried to see if it would solve my probs but i have exactly the same issue as i did with aterm

Offline

#4 2004-09-02 18:11:48

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

Re: weird and annoying font issues

My xfontsel shows now 10148 font names. All ttf and bitmap fonts are present.

My advice for you:

1. Install terminus font (build yourself or use tur) http://bbs.archlinux.org/viewtopic.php? … highlight= it is THE font for terminals. You can use ttf font in xterm/aterm (use xfontsel to select a font and paste font name to aterm using -fn "paste from xfontsel here") but it's really not recommended - it will work very bad and will look ugly. Xterm/aterm works great with fixed width fonts - that's where terminus font looks best (it can be also used under pure console without x - use for example setfont ter-214n. You may need to add -m 8859-2 or something like this to use it properly with your keyboard settings).
Add:
*font:-xos4-terminus-medium-r-normal-*-14-140-72-72-*-*-iso8859-2
(use your preffered coding of course in iso8859-2 place) to your ~/.Xdefaults or ~/.Xresources file to set terminus fonts as default font for all "normal" x applications (including xfontsel and xterms, aterms etc.) - be sure Xdefaults is loaded during x startup (if you are using xfce4 and startxfce4 script you have to modify /opt/xfce4/etc/xfce4/xinitrc to load settings from Xdefaults). To load Xdefault without restarting X use xrdb ~/.Xdefaults as user this time.

2. Do all the things that are done in the install file (fc-cache, mkfont...) from the PKGBUILD link above "manually" as root for every font directory that you have. You can add/delete font paths while working in X (no need for restart) with xset +fp /path/to/font/directory (-fp for delete). After this all fonts should appear in xfontsel. If it doesn't work you can always try rebooting or restarting X too :-)

Offline

#5 2004-09-02 20:39:12

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: weird and annoying font issues

i managed to delete my /encodings/encodings.dir  :oops:

do i need to start over and remove and reinstall all of my fonts?  these are the extra fonts i have installed - are there fonts that should be installed with x.org?

local/artwiz-fonts 1.3-1
    This is set of (improved) artwiz fonts.
local/ttf-ms-fonts 1.3-5
    Un-extracted TTF Fonts from Microsoft
local/xserver-terminus-fonts 4.09-1
    Clean fixed width fonts for console and x-server

Offline

#6 2004-09-03 08:02:31

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

Re: weird and annoying font issues

I don't think you really need to reinstall fonts but probably you should reinstall xorg (with -Sf option). It shouldn't do any harm to what's installed now. And if you really want to have all fonts visible in all X applications (not only qt/gtk2 based) you should do all that is in the install file I mentioned above for every font directory.
This is a standard procedure and perhaps not all font packages run all commands after installation, so you should run them manually. Do this and check if xfontsell can see all fonts including ttfs.

Offline

#7 2004-09-03 10:51:05

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: weird and annoying font issues

thanks lanrat - i have the fonts working great now but i will reinstall xorg i think! glad i kept the packages on a cd!

Offline

#8 2004-09-24 14:16:41

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: weird and annoying font issues

hmmm - i have installed the latest x.org and now some of my fonts are not working!

GRRRRRRRRR!

i have tried all these steps again - i wrote a bash script to re-cache all the fonts - but some of my TTF fonts are being found and some are not!  They are all in the same dir!

Argh!  I am cursed.

Offline

#9 2004-09-24 16:22:37

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

Re: weird and annoying font issues

I can't help you right now but I'm going to do a large upgrade including X server this weekend. We'll see...

Offline

#10 2004-09-24 16:37:07

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: weird and annoying font issues

Ok, I don't know why no one has updated Linux Font HOWTO's in ages.  Here's the deal:

The Xserver font path is old-school.  It's only used for non-freetype enabled apps (like xclock or something).  Even xterm supports freetype now (-fn and -fa).

Freetype fonts are NOT, repeat NOT, setup with the Xserver font path.  They use the fontconfig libraries.  There is almost no documentation online about this, so here goes:

fontconfig has 2 main config files: /etc/fonts/fonts.conf and /etc/fonts/local.conf.  Don't touch fonts.conf (it has many comments in the file saying "Dont edit"), edit local.conf if needed.  However, you probably won't need to edit local.conf unless you want argb hinting on an lcd screen (a whole 'nuther topic).  local.conf adds three dirs to the fontconfig path:

/usr/X11R6/lib/X11/fonts
/usr/share/fonts
~/.fonts

If you place all your fonts here, no config editing will be needed.

Now, I cannot recall when these fonts are cached, but I always do it manually... su over to root and run

fc-cache -fv

To force fontconfig to recache all fonts (the -v flag is for verbose so you can see what happens...).

Now, on a related topic, we will look at verifying loaded fonts.... or listing fonts used.

for non-freetype fonts:

xlsfont

for freetype fonts:

fc-list

use these in conjunction with grep to check for specific fonts....

Hope this is helpful!

Offline

#11 2004-09-24 16:50:36

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: weird and annoying font issues

configuration extras:

for font preferences in local.conf, let's look at an example:

<alias>
      <family>Courier</family>
      <prefer><family>Courier New</family></prefer>
      <default><family>monospace</family></default>
</alias>

This snippet will "replace" any request for the font "Courier" with the "Courier New" freetype font is available, and monospace if it is not... we can change it like so:

<alias>
      <family>Courier</family>
      <prefer><family>Times New Roman</family></prefer>
      <default><family>monospace</family></default>
</alias>

To replace requests for Courier with Times New Roman.

Font patterns, for referencing them, are also very very different for freetype fonts.  The normal -*-bitstream vera sans-*-*-*-*... syntax is deprecated...the new syntax is as follows:

<families>-<point sizes>:<name1>=<values1>:<name2>=<values2>...:<nameN>=<valueN>

Where name is one of the following:

family(string), style(string), slant(int), weight(int), size(double), 
aspect(double), pixelsize(double), spacing(int), foundry(string), 
antialias(bool)hinting(bool), verticallayout(bool), autohint(bool), 
globaladvance(bool), file(string), index(int), ftface(face), 
rasterizer(string), outline(bool), scalable(bool), scale(double), 
dpi(double), rgba(int), minspace(bool), charset(charset), lang(string)

I don't really know ALL the values for these, but most are obvious, and not all properties will work 100% of the time on all fonts...

Now to quote the Arch docs:
Q How do you know all this?
A man fontconfig..... really

Offline

#12 2004-09-24 16:57:06

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: weird and annoying font issues

And one final note:
fonts in Xserver's font path override fontconfig's fonts most of the time.  I would remove any path that fc-cache indicates as caching.
keep the X font path very small (faster load, less memory too)

Offline

#13 2004-09-24 17:21:06

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: weird and annoying font issues

um - that looked useful at first glance but all my fonts ARE under /usr/X11R6/lib/X11/fonts and i have run fc-cache -fv loads

...on second thought..i tired it with the -f and it seems to have worked smile  joy!

i still seem to have 4000 less matches than i did under 6.7 tho!

Offline

#14 2004-09-24 17:29:25

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: weird and annoying font issues

total up the matches between fc-list and xlsfont - that may catch your missing matches...

also, what commands are you using for the fonts?  IIRC urxvt requires this syntax to use freetype fonts:

urxvt -fn "xft:Times-10"

Offline

#15 2004-09-24 17:38:20

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: weird and annoying font issues

have not quite made the step to urxvt yet - which is embrassing smile but cheers for the hints

Offline

#16 2004-09-24 17:49:41

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: weird and annoying font issues

xfontsel

wink


Mr Green

Offline

#17 2004-09-24 17:57:59

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: weird and annoying font issues

sorry dibble,
urxvt == rxvt-unicode or unicode-rxvt (whatever)

and MrGreen:
xfontsel does nothing to list modern fonts (freetype).

fc-list and xlsfonts will work for a name listing of all available fonts

Offline

#18 2004-09-24 18:02:53

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,893
Website

Re: weird and annoying font issues

err like you know so much why not put it in Wiki .... then everyone will be  tongue


Mr Green

Offline

#19 2004-09-24 18:07:48

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: weird and annoying font issues

I guess I could.... let me organize some thoughts and things - and get some comments on here and stuff....

I can post a new "font HOWTO" for arch.... seeing as there are NO modern how-tos on this (most of them still mention xfs and xfsft - check this out from 1999 "Xfsft has now been integrated with the main branch of XFree86 as the `freetype' module, and the standalone version is no longer current.", ha! why do we still use these HOWTOs?)

Offline

#20 2004-09-24 20:14:18

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: weird and annoying font issues

ummmmmm - I made the PKGBUILD for urxvt (in New and Requested Packages) - it may else where as well - but it seems ironic that i made it and i haven't made the switch yet!  tongue

Offline

#21 2004-09-24 20:46:16

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

Re: weird and annoying font issues

I'm not really an expert but 3 things need explanation:

1. It's man fonts-conf not man fontconfig (no such manual).

2. xfontsel can show ttf fonts (at least mine does this - I've got "10148 names match"). They are not antialiased but still...

3. The 3 font dirs are not in /etc/fonts/local.conf but they are by default (at least in arch) already in /etc/fonts/fonts.conf. And you can also add/remove x font path dynamically using xset +/-fp while running xorg.

Most of the things we are discussing here are already covered in other threads and in the wiki. The problem was not improperly configured system but the lost of settings after xorg upgrade (the -f parameter in fc-cache is for forceing full fonts scan which is not default).

All of the above does not of course mean that you can't improve or put more knowledge in the wiki :-)

I think there is no easy way to get rid of the need to manually reinstall fonts/run fc-cache/rebuilding nvidia driver/etc. after xorg upgrade. This kind of procedure (if proven to work) would be nice to have in the wiki however :-)

Offline

#22 2004-09-24 21:53:47

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: weird and annoying font issues

well, I used to have "fc-cache -f" run on startup (rc.local) in order to make sure.... sure it took  a bit, but I only reboot after big X changes (because I can't fully wipe out xdm if it is respawning).

And yeah lanrat - I forgot about the "man fonts-conf"... my fault there.
And I thought the font dirs were in local.conf.... but you're most likely right (as those are all basically system default font dirs).

I'll have to look into xfontsel.... it may show TTF fonts, but it uses old XFDL syntax for fonts.... whereas the syntax speicifed above is modern (as of 2001ish) just not used for some obscure reason.

I sent Kieth an email regarding fontconfig and freetype and font HOWTOs... we'll see if he responds....

Until then, this is the best guide I've seen so far:
http://freedesktop.org/~xorg/X11R6.7.0/PDF/fonts.pdf

EDIT:
The only conflicting thing I've seen is the following ->
From above guide, discussing font type handling:

The list of font modules distributed with X11R6.7 is as follows:
    * bitmap: bitmap fonts
    * freetype: TrueType fonts, OpenType fonts, Type 1 fonts 
    * type1: alternate Type 1 backend and CIDFont backend;
    * xtt: alternate TrueType backend 
    * speedo: Bitstream Speedo fonts

From http://freetype.sourceforge.net/freetype2/

By default, FreeType 2 supports the following font formats:
    * TrueType fonts (and collections)
    * Type 1 fonts
    * CID-keyed Type 1 fonts
    * CFF fonts
    * OpenType fonts (both TrueType and CFF variants)
    * SFNT-based bitmap fonts
    * X11 PCF fonts
    * Windows FNT fonts
    * BDF fonts (including anti-aliased ones)
    * PFR fonts
    * Type42 fonts (limited support)


The current X.org Server is using freetype2 ( CVS updated to v2.1.8 )

Offline

#23 2004-09-25 01:34:13

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

Re: weird and annoying font issues

Thanks for the link. I'll read it soon (I hope :-)).

Offline

Board footer

Powered by FluxBB