Remove hack to only load font modules if magic strings appear in font path

This commit is contained in:
Alan Coopersmith 2008-12-01 16:08:55 -08:00
parent 5f3f14179e
commit bd147e6f4b

View File

@ -481,12 +481,9 @@ static XF86ConfModulePtr
configureModuleSection (void)
{
char **elist, **el;
/* Find the list of extension modules. */
/* Find the list of extension & font modules. */
const char *esubdirs[] = {
"extensions",
NULL
};
const char *fsubdirs[] = {
"fonts",
NULL
};
@ -505,28 +502,6 @@ configureModuleSection (void)
xfree(elist);
}
/* Process list of font backends separately to include only required ones */
elist = LoaderListDirs(fsubdirs, NULL);
if (elist) {
for (el = elist; *el; el++) {
XF86LoadPtr module;
module = xf86confcalloc(1, sizeof(XF86LoadRec));
module->load_name = *el;
/* Add only those font backends which are referenced by fontpath */
/* 'strstr(dFP,"/dir")' is meant as 'dFP =~ m(/dir\W)' */
if (defaultFontPath && (
(strcmp(*el, "freetype") == 0 &&
strstr(defaultFontPath, "/TTF")) ||
(strcmp(*el, "type1") == 0 &&
strstr(defaultFontPath, "/Type1"))))
ptr->mod_load_lst = (XF86LoadPtr)xf86addListItem(
(glp)ptr->mod_load_lst, (glp)module);
}
xfree(elist);
}
return ptr;
}