? font.patch Index: xap_UnixFontManager.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/unix/xap_UnixFontManager.cpp,v retrieving revision 1.31 diff -u -u -r1.31 xap_UnixFontManager.cpp --- xap_UnixFontManager.cpp 2000/04/20 20:36:32 1.31 +++ xap_UnixFontManager.cpp 2000/06/05 09:32:43 @@ -386,7 +386,14 @@ { 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) Index: xap_UnixPSParseAFM.c =================================================================== RCS file: /cvsroot/abi/src/af/xap/unix/xap_UnixPSParseAFM.c,v retrieving revision 1.6 diff -u -u -r1.6 xap_UnixPSParseAFM.c --- xap_UnixPSParseAFM.c 2000/05/30 04:00:35 1.6 +++ xap_UnixPSParseAFM.c 2000/06/05 09:32:43 @@ -60,6 +60,8 @@ * - introduced initializeArray() back to metric parsing * modified: SourceGear, Inc. May 29 2000 * - removed Win32 specific code. + * modified: mwm@mired.org Jun 01, 2000 + * - changed whitespace tests to use isspace */ #include @@ -69,6 +71,7 @@ #include #include #include +#include #include "xap_UnixPSParseAFM.h" #define lineterm EOL /* line terminating character */ @@ -156,12 +159,10 @@ int ch, idx; /* skip over white space */ - while ((ch = fgetc(stream)) == ' ' || ch == lineterm || - ch == ',' || ch == '\t' || ch == ';'); + while (isspace((ch = fgetc(stream))) || ch == ',' || ch == ';'); idx = 0; - while (ch != EOF && ch != ' ' && ch != lineterm - && ch != '\t' && ch != ':' && ch != ';') + while (ch != EOF && !isspace(ch) && ch != ':' && ch != ';') { ident[idx++] = ch; ch = fgetc(stream); @@ -189,7 +190,7 @@ { int ch, idx; - while ((ch = fgetc(stream)) == ' ' || ch == '\t' ); + while (isspace(ch = fgetc(stream))); idx = 0; while (ch != EOF && ch != lineterm) @@ -1110,7 +1111,6 @@ /* 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 */