Skip to content

Commit fef929f

Browse files
author
Scott MacVicar
committedApr 23, 2007
Fixed bug #40130 (TTF usage doesn't work properly under Netware)
1 parent 2bdfafa commit fef929f

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed
 

‎ext/gd/libgd/gd.h

+9-5
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ extern "C" {
77

88
#include "php_compat.h"
99

10-
#ifndef WIN32
11-
/* default fontpath for unix systems */
12-
#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:."
13-
#define PATHSEPARATOR ":"
14-
#else
10+
#ifdef NETWARE
11+
/* default fontpath for netware systems */
12+
#define DEFAULT_FONTPATH "sys:/java/nwgfx/lib/x11/fonts/ttf;."
13+
#define PATHSEPARATOR ";"
14+
#elif WIN32
1515
/* default fontpath for windows systems */
1616
#define DEFAULT_FONTPATH "c:\\winnt\\fonts;c:\\windows\\fonts;."
1717
#define PATHSEPARATOR ";"
18+
#else
19+
/* default fontpath for unix systems */
20+
#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:."
21+
#define PATHSEPARATOR ":"
1822
#endif
1923

2024
/* gd.h: declarations file for the graphic-draw module.

‎ext/gd/libgd/gdft.c

+4
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,11 @@ static void *fontFetch (char **error, void *key)
377377
path = gdEstrdup (fontsearchpath);
378378

379379
/* if name is an absolute filename then test directly */
380+
#ifdef NETWARE
381+
if (*name == '/' || (name[0] != 0 && strstr(name, ":/"))) {
382+
#else
380383
if (*name == '/' || (name[0] != 0 && name[1] == ':' && (name[2] == '/' || name[2] == '\\'))) {
384+
#endif
381385
snprintf(fullname, sizeof(fullname) - 1, "%s", name);
382386
if (access(fullname, R_OK) == 0) {
383387
font_found++;

0 commit comments

Comments
 (0)