James Cloos wrote: > +1 on concept. > > I know some dists are using a simple patch such as: > > diff --git a/dix/dixfonts.c b/dix/dixfonts.c > index 416adb3..719bca4 100644 > --- a/dix/dixfonts.c > +++ b/dix/dixfonts.c > @@ -1907,12 +1907,9 @@ InitFonts (void) > { > patternCache = MakeFontPatternCache(); > > -#ifdef BUILTIN_FONTS > BuiltinRegisterFpeFunctions(); > -#else > FontFileRegisterFpeFunctions(); > fs_register_fpe_functions(); > -#endif > } > > int > > A more complete patch is warranted, but perhaps just forcing built-ins > as the last entry of the fontpath is sufficient?
You are right. I only really tried to understand the logic behind it today, and made a "quick" patch. I will try another simpler patch, pseudo code: dix/main.c:main.c() ... InitFonts(); + str = strstr("built-ins", defaultFontPath); + end = str + strlen("built-ins"); + if (str == null || + ((str != defaultFontPath || str[-1] != ',') && + (!*end || *end != ','))) + defaultFontPath = Xprintf("%s%sbuilt-ins", defaultFontPath, + *defaultFontPath ? "," : ""); if (SetDefaultFontPath(defaultFontPath) != Success) { ... Will send a new version in a few minutes if it passes the test cases. The other patch has a big problem, that if the "default" font is not found, but a proper font path is already set, it will disable the proper one... > -JimC > -- > James Cloos <cl...@jhcloos.com> OpenPGP: 1024D/ED7DAEA6 Paulo _______________________________________________ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg