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

@@ -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();