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 )
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 :-)
]]>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?)
]]>and MrGreen:
xfontsel does nothing to list modern fonts (freetype).
fc-list and xlsfonts will work for a name listing of all available fonts
]]>xfontsel
]]>
also, what commands are you using for the fonts? IIRC urxvt requires this syntax to use freetype fonts:
urxvt -fn "xft:Times-10"
...on second thought..i tired it with the -f and it seems to have worked joy!
i still seem to have 4000 less matches than i did under 6.7 tho!
]]>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
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!
]]>