r21024 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Sun Feb 21 23:49:03 UTC 2016
Author: jghali
Date: Sun Feb 21 23:49:03 2016
New Revision: 21024
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21024
Log:
#13762: Font not embedded by default if first used after the first PDF export
Modified:
branches/Version14x/Scribus/scribus/pdfoptions.h
branches/Version14x/Scribus/scribus/pdfoptionsio.cpp
branches/Version14x/Scribus/scribus/pdfopts.cpp
branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
branches/Version14x/Scribus/scribus/tabpdfoptions.cpp
branches/Version14x/Scribus/scribus/tabpdfoptions.h
Modified: branches/Version14x/Scribus/scribus/pdfoptions.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21024&path=/branches/Version14x/Scribus/scribus/pdfoptions.h
==============================================================================
--- branches/Version14x/Scribus/scribus/pdfoptions.h (original)
+++ branches/Version14x/Scribus/scribus/pdfoptions.h Sun Feb 21 23:49:03 2016
@@ -108,6 +108,7 @@
PDFVersion Version;
int Resolution;
int Binding;
+ QList<QString> FontList;
QList<QString> EmbedList;
QList<QString> SubsetList;
bool MirrorH;
Modified: branches/Version14x/Scribus/scribus/pdfoptionsio.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21024&path=/branches/Version14x/Scribus/scribus/pdfoptionsio.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/pdfoptionsio.cpp (original)
+++ branches/Version14x/Scribus/scribus/pdfoptionsio.cpp Sun Feb 21 23:49:03 2016
@@ -126,6 +126,7 @@
addElem(m_root, "pdfVersion", pdfVersString);
addElem(m_root, "resolution", m_opts->Resolution);
addElem(m_root, "binding", m_opts->Binding);
+ addList(m_root, "fonts", m_opts->FontList);
addList(m_root, "embedFonts", m_opts->EmbedList);
addList(m_root, "subsetFonts", m_opts->SubsetList);
addElem(m_root, "mirrorH", m_opts->MirrorH);
@@ -347,6 +348,8 @@
return false;
if (!readElem(m_root, "binding", &m_opts->Binding))
return false;
+ if (!readList(m_root, "fonts", &m_opts->FontList))
+ return false;
if (!readList(m_root, "embedFonts", &m_opts->EmbedList))
return false;
if (!readList(m_root, "subsetFonts", &m_opts->SubsetList))
Modified: branches/Version14x/Scribus/scribus/pdfopts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21024&path=/branches/Version14x/Scribus/scribus/pdfopts.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/pdfopts.cpp (original)
+++ branches/Version14x/Scribus/scribus/pdfopts.cpp Sun Feb 21 23:49:03 2016
@@ -259,6 +259,7 @@
Opts.CompressMethod = (PDFOptions::PDFCompression) Options->CMethod->currentIndex();
Opts.Quality = Options->CQuality->currentIndex();
Opts.Resolution = Options->Resolution->value();
+ Opts.FontList = Options->FontList;
Opts.EmbedList = Options->FontsToEmbed;
Opts.SubsetList = Options->FontsToOutline;
Opts.RecalcPic = Options->DSColor->isChecked();
Modified: branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21024&path=/branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Sun Feb 21 23:49:03 2016
@@ -755,6 +755,11 @@
lpo.SpotFunc = pdfF.attribute("SpotFunction").toInt();
m_Doc->PDF_Options.LPISettings[pdfF.attribute("Color")] = lpo;
}
+ if (pdfF.tagName() == "DocFonts")
+ {
+ if (!m_Doc->PDF_Options.FontList.contains(pdfF.attribute("Name")))
+ m_Doc->PDF_Options.FontList.append(pdfF.attribute("Name"));
+ }
if (pdfF.tagName() == "Fonts")
{
if (!m_Doc->PDF_Options.EmbedList.contains(pdfF.attribute("Name")))
Modified: branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21024&path=/branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp (original)
+++ branches/Version14x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp Sun Feb 21 23:49:03 2016
@@ -710,6 +710,11 @@
docu.writeAttribute("fitWindow", static_cast<int>(m_Doc->PDF_Options.fitWindow));
docu.writeAttribute("PageLayout", m_Doc->PDF_Options.PageLayout);
docu.writeAttribute("openAction", m_Doc->PDF_Options.openAction);
+ for (int pdoA = 0; pdoA < m_Doc->PDF_Options.FontList.count(); ++pdoA)
+ {
+ docu.writeEmptyElement("DocFonts");
+ docu.writeAttribute("Name", m_Doc->PDF_Options.FontList[pdoA]);
+ }
for (int pdoF = 0; pdoF < m_Doc->PDF_Options.EmbedList.count(); ++pdoF)
{
docu.writeEmptyElement("Fonts");
Modified: branches/Version14x/Scribus/scribus/tabpdfoptions.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21024&path=/branches/Version14x/Scribus/scribus/tabpdfoptions.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/tabpdfoptions.cpp (original)
+++ branches/Version14x/Scribus/scribus/tabpdfoptions.cpp Sun Feb 21 23:49:03 2016
@@ -1127,6 +1127,24 @@
FontsToOutline.append(Opts.SubsetList[fe]);
}
}
+ // Check for fonts not previously used in doc
+ FontList = Opts.FontList;
+ for (it = DocFonts.constBegin(); it != DocFonts.constEnd(); ++it)
+ {
+ QString font = it.key();
+ if (FontList.contains(font) || FontsToEmbed.contains(font) || FontsToOutline.contains(font))
+ continue;
+ if (AllFonts[font].subset())
+ {
+ FontsToOutline.append(font);
+ OutlineList->addItem(font);
+ }
+ else
+ {
+ FontsToEmbed.append(font);
+ EmbedList->addItem(font);
+ }
+ }
QMap<QString, QString>::Iterator itAnn;
for (itAnn = AnnotationFonts.begin(); itAnn != AnnotationFonts.end(); ++itAnn)
{
@@ -1143,6 +1161,7 @@
delete OutlineList->takeItem(OutlineList->row(itR.at(0)));
}
}
+ FontList = DocFonts.keys();
}
CheckBox10->setChecked(Opts.PresentMode);
PagePrev->setChecked(false);
@@ -2298,6 +2317,7 @@
void TabPDFOptions::EmbedAll()
{
+ FontList.clear();
EmbedList->clear();
FontsToEmbed.clear();
OutlineList->clear();
@@ -2308,6 +2328,7 @@
FromOutline->setEnabled(false);
for (int a=0; a < AvailFlist->count(); ++a)
{
+ FontList.append(AvailFlist->item(a)->text());
if (AvailFlist->item(a)->flags() & Qt::ItemIsSelectable)
{
if (!AllFonts[AvailFlist->item(a)->text()].subset())
@@ -2337,6 +2358,7 @@
void TabPDFOptions::OutlineAll()
{
+ FontList.clear();
EmbedList->clear();
FontsToEmbed.clear();
OutlineList->clear();
@@ -2347,6 +2369,7 @@
FromOutline->setEnabled(false);
for (int a=0; a < AvailFlist->count(); ++a)
{
+ FontList.append(AvailFlist->item(a)->text());
if (AvailFlist->item(a)->flags() & Qt::ItemIsSelectable)
{
if (AnnotationFonts.contains(AvailFlist->item(a)->text()))
Modified: branches/Version14x/Scribus/scribus/tabpdfoptions.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21024&path=/branches/Version14x/Scribus/scribus/tabpdfoptions.h
==============================================================================
--- branches/Version14x/Scribus/scribus/tabpdfoptions.h (original)
+++ branches/Version14x/Scribus/scribus/tabpdfoptions.h Sun Feb 21 23:49:03 2016
@@ -167,6 +167,8 @@
int PgSel;
QList<PDFPresentationData> EffVal;
QString SelLPIcolor;
+
+ QList<QString> FontList;
QList<QString> FontsToEmbed;
QList<QString> FontsToOutline;
More information about the scribus-commit
mailing list