r22104 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Fri Jul 7 11:03:53 UTC 2017


Author: jghali
Date: Fri Jul  7 11:03:52 2017
New Revision: 22104

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

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

Modified: branches/Version14x/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22104&path=/branches/Version14x/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribusdoc.cpp	(original)
+++ branches/Version14x/Scribus/scribus/scribusdoc.cpp	Fri Jul  7 11:03:52 2017
@@ -3078,6 +3078,32 @@
 			}
 		}
 	}
+
+	QMap<QString, ScPattern>::const_iterator patIter;
+	for (patIter = docPatterns.begin(); patIter != docPatterns.end(); ++patIter)
+	{
+		const ScPattern& pat = patIter.value();
+		const QList<PageItem*> &patItems = pat.items;
+		for (int i = 0; i < patItems.count(); ++i)
+		{
+			const PageItem* it = patItems.at(i);
+			if ((it->itemType() == PageItem::TextFrame) || (it->itemType() == PageItem::PathText))
+			{
+				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