summaryrefslogtreecommitdiff
path: root/pl/pllfont.c
diff options
context:
space:
mode:
authorHenry Stiles <henry.stiles@artifex.com>2011-11-18 14:42:40 -0700
committerHenry Stiles <henry.stiles@artifex.com>2011-11-18 14:42:40 -0700
commit38cb1fd0cb7f38e6d7cf4b4fe06809865ccd0fff (patch)
treeb3f26e3505d4ad5c16f2bb4050c2962b5d532e85 /pl/pllfont.c
parent3457a11ec419dcce4cd9e444674967b4dd5e8740 (diff)
Fix 692559, integrate Josef Hinteregger's patch to detect a font
directory without fonts and continue gracefully.
Diffstat (limited to 'pl/pllfont.c')
-rw-r--r--pl/pllfont.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/pl/pllfont.c b/pl/pllfont.c
index 5712f2386..1a077de8d 100644
--- a/pl/pllfont.c
+++ b/pl/pllfont.c
@@ -190,6 +190,7 @@ pl_load_built_in_fonts(const char *pathname, gs_memory_t *mem,
char tmp_path_copy[1024];
char *tmp_pathp;
bool found;
+ bool found_any = false;
const char pattern[] = "*";
if (pathname == NULL) {
@@ -319,19 +320,18 @@ pl_load_built_in_fonts(const char *pathname, gs_memory_t *mem,
}
}
found = true;
+ found_any = true;
}
/* nothing found */
if (!found) {
- #ifdef DEBUG
- if (gs_debug_c('=')) {
- dprintf2("TrueType font %s in file %s not found in table\n", buffer, tmp_path_copy);
- code = get_name_from_tt_file(in, mem, buffer, WINDOWSNAME);
- dprintf1("Windows name %s\n", buffer);
- }
- #endif
- continue;
- } else {
+ #ifdef DEBUG
+ if (gs_debug_c('=')) {
+ dprintf2("TrueType font %s in file %s not found in table\n", buffer, tmp_path_copy);
+ code = get_name_from_tt_file(in, mem, buffer, WINDOWSNAME);
+ dprintf1("Windows name %s\n", buffer);
+ }
+ #endif
sfclose(in);
}
} /* next file */
@@ -340,7 +340,7 @@ pl_load_built_in_fonts(const char *pathname, gs_memory_t *mem,
if ( gs_debug_c('=') )
check_resident_fonts(pfontdict, mem);
#endif
- return 1;
+ return found_any;
}
/* These are not implemented */