Subject: Re: Type 1 postscript font support questions...
From: Mike Meyer (mwm@mired.org)
Date: Mon Jun 05 2000 - 01:17:36 CDT
sam th writes:
> The problem is that the ifdef WIN32 is gone from CVS code (it doesn't
> belong in Unix code).  Just take that out and make a new patch.  
I'm not sure who you were talking to, but I (think) I did what you
asked. Here's both patches, with that ifdef removed.
        Thanx,
        <mike
--- xap_UnixFontManager.cpp	Sat Jun  3 04:28:18 2000
+++ xap_UnixFontManager.cpp-orig	Thu Apr 20 15:36:32 2000
@@ -386,14 +386,7 @@
         {
                 s = XAP_UnixFont::STYLE_BOLD_ITALIC;
         }
-	else
-	{
-		UT_DEBUGMSG(("XAP_UnixFontManager::_allocateThisFont() - can't guess "
-					 "font style from XLFD.\n"));
-		FREEP(linedup);
-		return;
-	}
-
+	
         // do some voodoo to get the AFM file from the file name
         char * dot = strrchr(fontfile, '.');
         if (!dot)
--- xap_UnixPSParseAFM.c	Mon Jun  5 01:15:09 2000
+++ xap_UnixPSParseAFM.c-orig	Mon Jun  5 01:14:55 2000
@@ -58,8 +58,6 @@
  *    - if 0'd initializeArray()
  *  modified: AbiSource, Inc. Jun 14 1999
  *    - introduced initializeArray() back to metric parsing
- * modified: mwm@mired.org Jun 01, 2000
- *    - Changed whitespace tests to use isspace
  */
 
 #include <stdio.h>
@@ -69,7 +67,6 @@
 #include <malloc.h>
 #include <stdlib.h>
 #include <math.h>
-#include <ctype.h>
 #include "xap_UnixPSParseAFM.h"
  
 #define lineterm EOL	/* line terminating character */
@@ -157,10 +154,12 @@
     int ch, idx;
 
     /* skip over white space */
-    while (isspace((ch = fgetc(stream))) || ch == ',' || ch == ';');
+    while ((ch = fgetc(stream)) == ' ' || ch == lineterm || 
+            ch == ',' || ch == '\t' || ch == ';');
     
     idx = 0;
-    while (ch != EOF && !isspace(ch) && ch != ':' && ch != ';') 
+    while (ch != EOF && ch != ' ' && ch != lineterm 
+           && ch != '\t' && ch != ':' && ch != ';') 
     {
         ident[idx++] = ch;
         ch = fgetc(stream);
@@ -188,7 +187,7 @@
 {
     int ch, idx;
 
-    while (isspace(ch = fgetc(stream)));
+    while ((ch = fgetc(stream)) == ' ' || ch == '\t' ); 
     
     idx = 0;
     while (ch != EOF && ch != lineterm) 
@@ -1109,6 +1108,7 @@
     /* The AFM File begins with Global Font Information. This section */
     /* will be parsed whether or not information should be saved. */     
     code = parseGlobals(fp, (*fi)->gfi); 
+    
     if (code < 0) error = code;
     
     /* The Global Font Information is followed by the Character Metrics */
This archive was generated by hypermail 2b25 : Mon Jun 05 2000 - 03:04:24 CDT