Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 102116

Summary: Suggestion: Font path specifications should be moved to local.conf for easier modifications
Product: Gentoo Linux Reporter: Veselin Mijuskovic <panzer>
Component: [OLD] LibraryAssignee: Gentoo Fonts Team <fonts>
Status: RESOLVED WORKSFORME    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Veselin Mijuskovic 2005-08-11 05:54:21 UTC
Font path specifications are, by default, located in /etc/fonts/fonts.conf  
file, and this file should not be changed as it is overwritten by package  
upgrades. File /etc/fonts/local.conf should have all the local modifications 
and additions to the /etc/fonts/fonts.conf file which is system-wide, and 
$HOME/.fonts should have modifications and additions which is specific for 
certain user. However, regarding font paths, once specified in either of 
*.conf files, they cannot be excluded - that is, all <dir>...</dir> directives 
are added togehter to form search path in all files. For example, my problem 
was that Helvetica font could not be rendered anti-aliased, and lot of web 
sites use this font in their CSS (such as http://www.theregister.co.uk/). The 
only solution was to remove the directory where these fonts have been 
installed from the search path of the fontconfig. However, this specific path 
was in fonts.conf file, which should never be changed. Therefore, my 
suggestion is that these font paths should be moved to local.conf where they 
can be manipulated easily and without fear of overwritting it with next 
fontconfig upgrade build. The change is trivial, as it consists of a patch 
file already present in the fontconfig ebuild that should point to local.conf 
instead of font.conf. 

Reproducible: Always
Steps to Reproduce:
1. change fonts.conf to include all /usr/share/fonts/* directories except 
for /usr/share/fonts/Type1 dir. 
2. fc-cache -fv  
3. emerge fontconfig 
4. fc-cache -fv searches thru /usr/share/fonts/Type1 again 
 
Actual Results:  
Helvetica font is back in its ugly form. 

Expected Results:  
Move <dir></dir> directives to /etc/fonts/local.conf where they can be 
preserved.
Comment 1 Jonas MG 2005-11-27 15:35:09 UTC
I agree totally.

The <dir> tags should be in local.conf because it depends on each user and they
can be preserved.
Comment 2 Jonas MG 2005-11-29 12:07:49 UTC
I have wrotten to fontconfig mailing list to questioning about this problem

http://lists.freedesktop.org/archives/fontconfig/2005-November/001730.html
http://lists.freedesktop.org/archives/fontconfig/2005-November/001737.html

They certainly can't put all fonts in local.conf
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2007-06-22 02:01:45 UTC
in fontconfig-2.4 which is stable on all arches you can now specify directories to exclude in local.conf.

eg.

<rejectfont>
   <glob>/usr/X11R6/lib/X11/fonts</glob>
</rejectfont>