Bug #826: Make xorgconfig respect font installation outside $PROJECTROOT.

(Donnie Berkholz)
This commit is contained in:
Adam Jackson 2005-02-11 06:37:38 +00:00
parent e7369daba5
commit e5ccccfbd4

View File

@ -90,11 +90,11 @@
* - Load "speedo" module. * - Load "speedo" module.
* - Ready to DRI. * - Ready to DRI.
* - Load xtt module instead of freetype module. * - Load xtt module instead of freetype module.
* - Add font path "/fonts/TrueType/" and "/fonts/freefont/". * - Add font path "/TrueType/" and "/freefont/".
* Chisato Yamauchi(cyamauch@phyas.aichi-edu.ac.jp) * Chisato Yamauchi(cyamauch@phyas.aichi-edu.ac.jp)
*/ */
/* $XConsortium: xf86config.c /main/21 1996/10/28 05:43:57 kaleb $ */ /* $XConsortium: xf86config.c /main/21 1996/10/28 05:43:57 kaleb $ */
/* $XdotOrg: xc/programs/Xserver/hw/xfree86/xf86config/xorgconfig.c,v 1.10 2005/01/04 00:16:20 alanc Exp $ */ /* $XdotOrg: xc/programs/Xserver/hw/xfree86/xf86config/xorgconfig.c,v 1.11 2005/01/30 21:18:46 alanc Exp $ */
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
@ -175,6 +175,11 @@ static int getuid() { return 0; }
#else #else
# define TREEROOTDOC TREEROOTLX "/doc" # define TREEROOTDOC TREEROOTLX "/doc"
#endif #endif
#ifdef XFONTDIR
# define TREEROOTFONT XFONTDIR
#else
# define TREEROOTFONT TREEROOTLX "/fonts"
#endif
#define MODULEPATH TREEROOT "/lib/modules" #define MODULEPATH TREEROOT "/lib/modules"
#ifndef XCONFIGFILE #ifndef XCONFIGFILE
@ -1966,17 +1971,17 @@ static char *XF86Config_firstchunk_text =
static char *XF86Config_fontpaths[] = static char *XF86Config_fontpaths[] =
{ {
/* " FontPath \"" TREEROOTLX "/fonts/75dpi/\"\n"*/ /* " FontPath \"" TREEROOTFONT "/75dpi/\"\n"*/
"/fonts/local/", "/local/",
"/fonts/misc/", "/misc/",
"/fonts/75dpi/:unscaled", "/75dpi/:unscaled",
"/fonts/100dpi/:unscaled", "/100dpi/:unscaled",
"/fonts/Speedo/", "/Speedo/",
"/fonts/Type1/", "/Type1/",
"/fonts/TrueType/", "/TrueType/",
"/fonts/freefont/", "/freefont/",
"/fonts/75dpi/", "/75dpi/",
"/fonts/100dpi/", "/100dpi/",
0 /* end of fontpaths */ 0 /* end of fontpaths */
}; };
@ -2505,7 +2510,7 @@ write_fontpath_section(FILE *f)
#endif #endif
for (i=0; XF86Config_fontpaths[i]; i++) { for (i=0; XF86Config_fontpaths[i]; i++) {
strcpy(cur,TREEROOTLX); strcpy(cur,TREEROOTFONT);
strcat(cur,XF86Config_fontpaths[i]); strcat(cur,XF86Config_fontpaths[i]);
/* remove a ':' */ /* remove a ':' */
colon = strchr(cur+2,':'); /* OS/2: C:/...:scaled */ colon = strchr(cur+2,':'); /* OS/2: C:/...:scaled */
@ -2518,7 +2523,7 @@ write_fontpath_section(FILE *f)
hash = exists_dir(cur) ? "" : "#"; hash = exists_dir(cur) ? "" : "#";
fprintf(f,"%s FontPath \"%s%s\"\n", fprintf(f,"%s FontPath \"%s%s\"\n",
hash, hash,
TREEROOTLX, TREEROOTFONT,
XF86Config_fontpaths[i]); XF86Config_fontpaths[i]);
} }
} }