r18537 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:45:09 UTC 2013


Author: jghali
Date: Wed Oct  9 10:45:09 2013
New Revision: 18537

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

Modified:
    branches/Version14x/Scribus/scribus/scfonts.cpp

Modified: branches/Version14x/Scribus/scribus/scfonts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18537&path=/branches/Version14x/Scribus/scribus/scfonts.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scfonts.cpp (original)
+++ branches/Version14x/Scribus/scribus/scfonts.cpp Wed Oct  9 10:45:09 2013
@@ -564,14 +564,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