r22235 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Mon Dec 4 19:35:51 UTC 2017


Author: jghali
Date: Mon Dec  4 19:35:51 2017
New Revision: 22235

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22235
Log:
#15061: Crash with Noto Coloremoji font

Modified:
    trunk/Scribus/scribus/scfonts.cpp

Modified: trunk/Scribus/scribus/scfonts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22235&path=/trunk/Scribus/scribus/scfonts.cpp
==============================================================================
--- trunk/Scribus/scribus/scfonts.cpp	(original)
+++ trunk/Scribus/scribus/scfonts.cpp	Mon Dec  4 19:35:51 2017
@@ -671,6 +671,16 @@
 	{
 		if (showFontInformation)
 			sDebug(QObject::tr("Failed to load font %1 - font type unknown").arg(filename));
+		FT_Done_Face(face);
+		checkedFonts.insert(filename, foCache);
+		return true;
+	}
+	// Some fonts such as Noto ColorEmoji are in fact bitmap fonts
+	// and do not provide a valid value for units_per_EM
+	if (face->units_per_EM == 0)
+	{
+		if (showFontInformation)
+			sDebug(QObject::tr("Failed to load font %1 - font is not scalable").arg(filename));
 		FT_Done_Face(face);
 		checkedFonts.insert(filename, foCache);
 		return true;




More information about the scribus-commit mailing list