2003-03-03 01:54:11 -05:00
|
|
|
$OpenBSD: patch-xfstt_cpp,v 1.4 2003/03/03 06:54:11 ish Exp $
|
|
|
|
--- xfstt.cpp.orig Sat Dec 11 12:23:45 1999
|
|
|
|
+++ xfstt.cpp Mon Nov 25 16:32:38 2002
|
2000-09-18 21:54:48 -04:00
|
|
|
@@ -11,8 +11,8 @@
|
|
|
|
#define UNSTRAPLIMIT 10500U
|
|
|
|
|
|
|
|
// Change these if you don't lie being FHS complient
|
|
|
|
-#define TTFONTDIR "/usr/share/fonts/truetype"
|
|
|
|
-#define TTCACHEDIR "/var/cache/xfstt"
|
2001-01-18 22:42:57 -05:00
|
|
|
+#define TTFONTDIR "/usr/local/lib/X11/fonts/TrueType"
|
|
|
|
+#define TTCACHEDIR "/usr/local/lib/X11/fonts/TrueType"
|
2000-09-18 21:54:48 -04:00
|
|
|
|
|
|
|
#define TTINFO_LEAF "ttinfo.dir"
|
|
|
|
#define TTNAME_LEAF "ttname.dir"
|
2002-09-30 10:47:24 -04:00
|
|
|
@@ -470,10 +470,12 @@ static XFSFont* openFont( TTFont* ttFont
|
2000-09-18 21:54:48 -04:00
|
|
|
raster->getFontExtent( &xfs->fe);
|
|
|
|
|
|
|
|
int used = (xfs->fe.bitmaps + xfs->fe.bmplen) - xfs->fe.buffer;
|
|
|
|
+ int bmpoff = xfs->fe.bitmaps - xfs->fe.buffer;
|
|
|
|
xfs->fe.buffer = (U8*)shrinkMem( xfs->fe.buffer, used);
|
|
|
|
- if( xfs->fe.buffer)
|
|
|
|
+ if( xfs->fe.buffer) {
|
|
|
|
xfs->fe.buflen = used;
|
|
|
|
- else {
|
|
|
|
+ xfs->fe.bitmaps = xfs->fe.buffer + bmpoff;
|
|
|
|
+ } else {
|
|
|
|
xfs->fid = 0; //###
|
|
|
|
xfs = 0;
|
|
|
|
}
|
2003-03-03 01:54:11 -05:00
|
|
|
@@ -642,7 +644,7 @@ static int prepare2connect( int portno)
|
|
|
|
s_unix.sa_family = PF_UNIX;
|
|
|
|
sprintf( s_unix.sa_data, "fs%d", portno);
|
|
|
|
sockname = s_unix.sa_data;
|
|
|
|
- mkdir( "/tmp/.font-unix", 0766);
|
|
|
|
+ mkdir( "/tmp/.font-unix", 0755);
|
|
|
|
chdir( "/tmp/.font-unix");
|
|
|
|
unlink( s_unix.sa_data);
|
|
|
|
if( bind( sd_unix, (struct sockaddr*)&s_unix, sizeof(s_unix))) {
|
|
|
|
@@ -650,6 +652,8 @@ static int prepare2connect( int portno)
|
|
|
|
fputs( "Please check permissions.\n", stderr);
|
|
|
|
}
|
|
|
|
listen( sd_unix, 1); // only one connection
|
|
|
|
+ if (chmod(s_unix.sa_data, 0777) == -1)
|
|
|
|
+ fprintf( stderr, "Couldn't set mode on /tmp/.font-unix/%s\n", s_unix.sa_data);
|
|
|
|
}
|
|
|
|
|
|
|
|
if( !sd_inet) {
|