mirror of
https://github.com/php/php-src.git
synced 2024-11-26 11:23:47 +08:00
Fixed bug #21445.
This commit is contained in:
parent
7dae400063
commit
b52eb8f14a
@ -7,11 +7,11 @@ extern "C" {
|
||||
|
||||
#ifndef WIN32
|
||||
/* default fontpath for unix systems */
|
||||
#define DEFAULT_FONTPATH "/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/TrueType:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1"
|
||||
#define DEFAULT_FONTPATH "/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/TrueType:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1:."
|
||||
#define PATHSEPARATOR ":"
|
||||
#else
|
||||
/* default fontpath for windows systems */
|
||||
#define DEFAULT_FONTPATH "c:\\winnt\\fonts"
|
||||
#define DEFAULT_FONTPATH "c:\\winnt\\fonts;."
|
||||
#define PATHSEPARATOR ";"
|
||||
#endif
|
||||
|
||||
|
@ -398,6 +398,11 @@ static void *fontFetch (char **error, void *key)
|
||||
}
|
||||
}
|
||||
for (dir = strtok (path, PATHSEPARATOR); dir; dir = strtok (0, PATHSEPARATOR)) {
|
||||
sprintf(fullname, "%s/%s", dir, name);
|
||||
if (access (fullname, R_OK) == 0) {
|
||||
font_found++;
|
||||
break;
|
||||
}
|
||||
sprintf(fullname, "%s/%s.ttf", dir, name);
|
||||
if (access (fullname, R_OK) == 0) {
|
||||
font_found++;
|
||||
|
Loading…
Reference in New Issue
Block a user