Fonts: Fix builtin fonts

Make sure the font path is always 'built-ins' when we use built-in fonts,
rather than having it as a fixed path for a while, then clobbering it
halfway through startup.
This commit is contained in:
Daniel Stone 2007-07-08 14:31:35 +03:00
parent 9ac7e8a559
commit 4d3379d418
3 changed files with 7 additions and 6 deletions

View File

@ -836,6 +836,7 @@ fi
if test "x$BUILTIN_FONTS" = xyes; then
AC_DEFINE(BUILTIN_FONTS, 1, [Use only built-in fonts])
AC_DEFINE(NOFONTSERVERACCESS, 1, [Avoid using a font server])
FONTPATH="built-ins"
fi
if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then

View File

@ -399,14 +399,10 @@ main(int argc, char *argv[], char *envp[])
FatalError("failed to initialize core devices");
InitFonts();
#ifdef BUILTIN_FONTS
defaultFontPath = "built-ins";
#else
if (loadableFonts) {
SetFontPath(0, 0, (unsigned char *)defaultFontPath, &error);
} else
#endif
{
}
else {
if (SetDefaultFontPath(defaultFontPath) != Success)
ErrorF("failed to set default font path '%s'",
defaultFontPath);
@ -414,6 +410,7 @@ main(int argc, char *argv[], char *envp[])
if (!SetDefaultFont(defaultTextFont)) {
FatalError("could not open default font '%s'", defaultTextFont);
}
#ifdef NULL_ROOT_CURSOR
cm.width = 0;
cm.height = 0;
@ -430,6 +427,7 @@ main(int argc, char *argv[], char *envp[])
defaultCursorFont);
}
#endif
#ifdef DPMSExtension
/* check all screens, looking for DPMS Capabilities */
DPMSCapableFlag = DPMSSupported();

View File

@ -982,7 +982,9 @@ OsVendorInit()
signal(SIGCHLD, SIG_DFL); /* Need to wait for child processes */
#endif
OsDelayInitColors = TRUE;
#ifndef BUILTIN_FONTS
loadableFonts = TRUE;
#endif
if (!beenHere)
xf86LogInit();