r22236 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Mon Dec 4 19:36:52 UTC 2017


Author: jghali
Date: Mon Dec  4 19:36:52 2017
New Revision: 22236

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

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

Modified: branches/Version14x/Scribus/scribus/scfonts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22236&path=/branches/Version14x/Scribus/scribus/scfonts.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scfonts.cpp	(original)
+++ branches/Version14x/Scribus/scribus/scfonts.cpp	Mon Dec  4 19:36:52 2017
@@ -339,6 +339,15 @@
 	{
 		if (showFontInformation)
 			sDebug(QObject::tr("Failed to load font %1 - font type unknown").arg(filename));
+		checkedFonts.insert(filename, foCache);
+		error = 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));
 		checkedFonts.insert(filename, foCache);
 		error = true;
 	}




More information about the scribus-commit mailing list