Re: X11.tmpl wrong for mkfontscale/dir ?

2003-06-30 Thread Kean Johnston
Kean Johnston wrote:
All,

I just pulled from the cvs head (well yesterday afternoon, or about 12 
hours ago) and the build is failing becuase X11.tmpl. at about line 
3675, has:
   RunProgram(MKFONTDIR, -n -r -p inst/ $$E .))

But MKFONTDIR is expanding to mkfontscale, which doesn't support these 
options. Thats becuase up at around line 1507 MKFONTDIR is being se to 
mkfontscale. Is that wrong? Was that a typo? Should it really be 
refering to mkfontdir there?
Ok I see from the changelong that it shouldn't, that mkfontscale is now 
the Tool To Use. So just removing the -n -r from that line causes the 
build to succeed, but the server doesn't start after doing a make 
install. It fails saying it cant fine the font fixed. If I do to 
fonts/misc and run mkfontdir (which is now the wrapper script) then the 
server starts, but twm doesn't. Do I have to go to 75dpi/ and 100dpi/ 
and run mkfontdir and then it works. Strange thing is, the resulting 
fonts.dir is MUCH smaller in 75dpi than what comes out of the build. 
Same in misc/.

Looks as if there is still some missing glue from the replace mkfontdir 
with mkfontscale work?

Kean

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: X11.tmpl wrong for mkfontscale/dir ?

2003-06-30 Thread Kean Johnston
-n -r -p are documented in man mkfontdir, but -n and -r aren't 
implemented in mkfontscale. Thus bug #387 is not complete yet.
Attached is a patch that implements these options in mkfontscale, as 
well as improving slightly the semantics of mkfontdir. Also fix two 
pre-processor bugs in X11.tmpl that cause imake warnings.

Kean
Index: config/cf/X11.tmpl
===
RCS file: /cvs/xc/config/cf/X11.tmpl,v
retrieving revision 1.208
diff -u -r1.208 X11.tmpl
--- config/cf/X11.tmpl  2003/06/27 14:53:08 1.208
+++ config/cf/X11.tmpl  2003/06/30 14:52:33
@@ -3823,7 +3823,7 @@
 #endif
 #endif
 
-#ifndef MakeTblHtmlDoc(file,srcs)
+#ifndef MakeTblHtmlDoc
 #ifdef HTMLroffCmd
 #define MakeTblHtmlDoc(file,srcs)  @@\
 file.html: srcs@@\
@@ -3835,7 +3835,7 @@
 #endif
 #endif
 
-#ifndef MakeEqnHtmlDoc(file,srcs)
+#ifndef MakeEqnHtmlDoc
 #ifdef HTMLroffCmd
 #define MakeEqnHtmlDoc(file,srcs)  @@\
 file.html: srcs@@\
Index: programs/mkfontscale/mkfontscale.c
===
RCS file: /cvs/xc/programs/mkfontscale/mkfontscale.c,v
retrieving revision 1.7
diff -u -r1.7 mkfontscale.c
--- programs/mkfontscale/mkfontscale.c  2003/06/20 15:49:52 1.7
+++ programs/mkfontscale/mkfontscale.c  2003/06/30 14:52:35
@@ -74,21 +74,24 @@
 
 #define countof(_a) (sizeof(_a)/sizeof((_a)[0]))
 
-int doDirectory(char*, int, ListPtr);
+static int doDirectory(char*, int, ListPtr);
 static int checkEncoding(FT_Face face, char *encoding_name);
 static int checkExtraEncoding(FT_Face face, char *encoding_name, int found);
 static int find_cmap(int type, int pid, int eid, FT_Face face);
 static char* notice_foundry(char *notice);
 static char* vendor_foundry(signed char *vendor);
-int readFontScale(HashTablePtr entries, char *dirname);
+static int readFontScale(HashTablePtr entries, char *dname);
 ListPtr makeXLFD(char *filename, FT_Face face, int);
+static int readEncodings(ListPtr encodings, char *dname);
 
 static FT_Library ft_library;
 static float bigEncodingFuzz = 0.02;
 
+static int relative;
 static int doScalable;
 static int doBitmaps;
-static int doEncodings;
+static int onlyEncodings;
+static int onlyEncodings;
 static ListPtr encodingsToDo;
 static int reencodeLegacy;
 char *encodingPrefix = NULL;
@@ -99,7 +102,7 @@
 fprintf(stderr, 
 mkfontscale [ -b ] [ -s ] [ -o filename ] \n
 [ -x encoding ] [ -f fuzz ] [ -l ] 
-[ -e directory ] [ -p prefix ]\n
+[ -e directory ] [ -p prefix ] [ -n ] [ -r] \n
 [ directory ]...\n);
 }
 
@@ -108,7 +111,7 @@
 {
 int argn;
 FT_Error ftrc;
-int rc;
+int rc, ll = 0;
 char prefix[NPREFIX];
 
 if(getcwd(prefix, NPREFIX - 1) == NULL) {
@@ -127,8 +130,9 @@
NULL, 0);
 doBitmaps = 0;
 doScalable = 1;
+onlyEncodings = 0;
+relative = 0;
 reencodeLegacy = 1;
-doEncodings = 0;
 encodingsToDo = NULL;
 
 argn = 1;
@@ -161,7 +165,6 @@
 usage();
 exit(1);
 }
-doEncodings = 1;
 rc = readEncodings(encodingsToDo, argv[argn + 1]);
 if(rc  0)
 exit(1);
@@ -172,6 +175,12 @@
 } else if(strcmp(argv[argn], -s) == 0) {
 doScalable = 0;
 argn++;
+} else if(strcmp(argv[argn], -n) == 0) {
+onlyEncodings = 1;
+argn++;
+} else if(strcmp(argv[argn], -r) == 0) {
+relative = 1;
+argn++;
 } else if(strcmp(argv[argn], -l) == 0) {
 reencodeLegacy = !reencodeLegacy;
 argn++;
@@ -209,13 +218,14 @@
 fprintf(stderr, Could not initialise FreeType library: %d\n, ftrc);
 exit(1);
 }
-
 
+ll = listLength(encodingsToDo);
+
 if (argn == argc)
-doDirectory(., doEncodings, encodingsToDo);
+doDirectory(., ll, encodingsToDo);
 else
 while(argn  argc) {
-doDirectory(argv[argn], doEncodings, encodingsToDo);
+doDirectory(argv[argn], ll, encodingsToDo);
 argn++;
 }
 return 0;
@@ -625,10 +635,10 @@
 return xlfd;
 }
 
-int
-readFontScale(HashTablePtr entries, char *dirname)
+static int
+readFontScale(HashTablePtr entries, char *dname)
 {
-int n = strlen(dirname);
+int n = strlen(dname);
 char *filename;
 FILE *in;
 int rc, count, i;
@@ -638,10 +648,10 @@
 snprintf(format, 100, %%%ds %%%d[^\n]\n, 
  MAXFONTFILENAMELEN, MAXFONTNAMELEN);
 
-if(dirname[n - 1] == '/')
-filename = dsprintf(%sfonts.scale, dirname);
+if(dname[n - 1] == '/')
+filename = dsprintf(%sfonts.scale, dname);
 else
-

Re: X11.tmpl wrong for mkfontscale/dir ?

2003-06-30 Thread Kean Johnston
Kean Johnston wrote:
Attached is a patch that implements these options in mkfontscale, as 
well as improving slightly the semantics of mkfontdir. Also fix two 
pre-processor bugs in X11.tmpl that cause imake warnings.
By the way this patch changes (as you can see) the variable dirname to 
dname, as some systems define a function called dirname, and this 
produces extra warnings if you use -Wshadow. Also, I dont think this 
addresses the issue of fonts.alias not being read. Seems like mkfontdir 
uses the FontFile library, which handles this. mkfontscasle doesn't (at 
least at a cursory glance). I think I'll move onto other things now and 
let the font experts take over on this ...

Kean

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel