r18536 by jghali - fix slew of freetype warnings outputted on terminal on startup when Type1 fonts are installed

scribus-commit scribus-commit at lists.scribus.net
Wed Oct 9 10:43:44 UTC 2013


Author: jghali
Date: Wed Oct  9 10:43:44 2013
New Revision: 18536

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18536
Log:
fix slew of freetype warnings outputted on terminal on startup when Type1 fonts are installed

Modified:
    trunk/Scribus/scribus/scfonts.cpp

Modified: trunk/Scribus/scribus/scfonts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18536&path=/trunk/Scribus/scribus/scfonts.cpp
==============================================================================
--- trunk/Scribus/scribus/scfonts.cpp (original)
+++ trunk/Scribus/scribus/scfonts.cpp Wed Oct  9 10:43:44 2013
@@ -570,14 +570,15 @@
 				break;
 			}
 		}
+		if ((++faceindex) >= face->num_faces)
+			break;
 		FT_Done_Face(face);
-		face=NULL;
-		++faceindex;
-		error = FT_New_Face( library, QFile::encodeName(filename), faceindex, &face );
+		face = NULL;
+		error = FT_New_Face(library, QFile::encodeName(filename), faceindex, &face);
 	} //while
 	
 	if (face != 0)
-		FT_Done_Face( face );
+		FT_Done_Face(face);
 	return error && faceindex == 0;
 }
 




More information about the scribus-commit mailing list