r22103 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Fri Jul 7 11:02:47 UTC 2017


Author: jghali
Date: Fri Jul  7 11:02:47 2017
New Revision: 22103

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22103
Log:
#14898: Fonts used only in symbols can't be embedded in PDFs

Modified:
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22103&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Fri Jul  7 11:02:47 2017
@@ -4353,6 +4353,39 @@
 			}
 		}
 	}
+
+	QHash<QString, ScPattern>::const_iterator patIter;
+	for (patIter = docPatterns.begin(); patIter != docPatterns.end(); ++patIter)
+	{
+		const ScPattern& pat = patIter.value();
+		allItems = pat.items;
+		while (allItems.count() > 0)
+		{
+			PageItem *it = allItems.takeFirst();
+			if (it->isGroup() || it->isTable())
+			{
+				allItems = it->getItemList() + allItems;
+				continue;
+			}
+			if ((it->itemType() == PageItem::TextFrame) || (it->itemType() == PageItem::PathText))
+			{
+				if (it->invalid)
+					it->layout();
+				QString fontName(it->itemText.defaultStyle().charStyle().font().replacementName());
+				Really.insert(fontName, UsedFonts[fontName]);
+				int start = it->firstInFrame();
+				int stop = it->lastInFrame();
+				for (int e = start; e <= stop; ++e)
+				{
+					QString rep = it->itemText.charStyle(e).font().replacementName();
+					if (Really.contains(rep))
+						continue;
+					Really.insert(rep, UsedFonts[rep]);
+				}
+			}
+		}
+	}
+
 	QMap<QString,int>::Iterator itfo, itnext;
 	for (itfo = UsedFonts.begin(); itfo != UsedFonts.end(); itfo = itnext)
 	{




More information about the scribus-commit mailing list