diff options
Diffstat (limited to 'nx-X11/programs')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Font.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index 6fb6c8f35..d5c9f8982 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -71,10 +71,13 @@ is" without express or implied warranty. #undef TEST #undef DEBUG -#define NXAGENT_DEFAULT_FONT_DIR "/usr/share/nx/fonts" -#define NXAGENT_ALTERNATE_FONT_DIR "/usr/share/X11/fonts" -#define NXAGENT_ALTERNATE_FONT_DIR_2 "/usr/share/fonts/X11" -#define NXAGENT_ALTERNATE_FONT_DIR_3 "/usr/X11R6/lib/X11/fonts" +const char * nxagentFontDirs[] = { + "/usr/share/nx/fonts", + "/usr/share/X11/fonts", + "/usr/share/fonts/X11", + "/usr/X11R6/lib/X11/fonts", + NULL +}; const char * nxagentFontSubdirs[] = { "Type1", @@ -1491,10 +1494,15 @@ void nxagentVerifyDefaultFontPath(void) return; } - nxagentVerifySingleFontPath(&fontPath, NXAGENT_DEFAULT_FONT_DIR); - nxagentVerifySingleFontPath(&fontPath, NXAGENT_ALTERNATE_FONT_DIR); - nxagentVerifySingleFontPath(&fontPath, NXAGENT_ALTERNATE_FONT_DIR_2); - nxagentVerifySingleFontPath(&fontPath, NXAGENT_ALTERNATE_FONT_DIR_3); + for (int i = 0; ; i++) + { + char *dir = nxagentFontDirs[i]; + + if (dir == NULL) + break; + else + nxagentVerifySingleFontPath(&fontPath, dir); + } if (*fontPath == '\0') { |