mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
print/scribus: update to 1.7.3
see https://wiki.scribus.net/canvas/1.7.3_Release
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
DPB_PROPERTIES= parallel
|
||||
|
||||
COMMENT= desktop publishing program
|
||||
DISTNAME= scribus-1.7.2
|
||||
DISTNAME= scribus-1.7.3
|
||||
CATEGORIES= print
|
||||
|
||||
HOMEPAGE= https://www.scribus.net/
|
||||
@@ -13,8 +13,8 @@ WANTLIB += ${COMPILER_LIBCXX} GL Qt6Core Qt6Core5Compat Qt6Gui
|
||||
WANTLIB += Qt6Network Qt6PrintSupport Qt6Svg Qt6Widgets Qt6Xml
|
||||
WANTLIB += c cairo cups execinfo fontconfig freetype harfbuzz
|
||||
WANTLIB += harfbuzz-icu harfbuzz-subset hunspell-1.7 icudata icuuc
|
||||
WANTLIB += jpeg lcms2 m png podofo poppler qtadvanceddocking-qt6
|
||||
WANTLIB += tiff util xml2 z ${MODPY_WANTLIB}
|
||||
WANTLIB += jpeg jxl jxl_cms jxl_threads lcms2 m png podofo poppler
|
||||
WANTLIB += qtadvanceddocking-qt6 tiff util xml2 z ${MODPY_WANTLIB}
|
||||
|
||||
SITES= ${SITE_SOURCEFORGE:=scribus/}
|
||||
EXTRACT_SUFX= .tar.xz
|
||||
@@ -42,6 +42,7 @@ LIB_DEPENDS= graphics/lcms2 \
|
||||
textproc/libxml \
|
||||
textproc/podofo \
|
||||
graphics/jpeg \
|
||||
graphics/libjxl \
|
||||
x11/qt6/qt5compat \
|
||||
x11/qt6/qtsvg \
|
||||
x11/qtadvanceddocking>=4.4.0 \
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
SHA256 (scribus-1.7.2.tar.xz) = nY4RzGusLNlsVTnvvXGSIv9/cOHBhZcogNn7MFHhONA=
|
||||
SIZE (scribus-1.7.2.tar.xz) = 97976736
|
||||
SHA256 (scribus-1.7.3.tar.xz) = iC7lXKRJfALE4F8wrMaJ6h9IXC6AI8nrKT9RwsW+Bq0=
|
||||
SIZE (scribus-1.7.3.tar.xz) = 98101324
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
https://github.com/scribusproject/scribus/commit/28bd3be104c06b9d4532affe150f7b74fe5b3e59
|
||||
|
||||
Index: scribus/plugins/import/pdf/importpdf.cpp
|
||||
--- scribus/plugins/import/pdf/importpdf.cpp.orig
|
||||
+++ scribus/plugins/import/pdf/importpdf.cpp
|
||||
@@ -79,7 +79,11 @@ QImage PdfPlug::readThumbnail(const QString& fName)
|
||||
bgColor[0] = 255;
|
||||
bgColor[1] = 255;
|
||||
bgColor[2] = 255;
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
+ SplashOutputDev dev(splashModeXBGR8, 4, bgColor, true);
|
||||
+#else
|
||||
SplashOutputDev dev(splashModeXBGR8, 4, false, bgColor, true);
|
||||
+#endif
|
||||
dev.setVectorAntialias(true);
|
||||
dev.setFreeTypeHinting(true, false);
|
||||
dev.startDoc(&pdfDoc);
|
||||
@@ -154,20 +158,17 @@ bool PdfPlug::importFile(const QString& fNameIn, const
|
||||
}
|
||||
double docWidth = PrefsManager::instance().appPrefs.docSetupPrefs.pageWidth;
|
||||
double docHeight = PrefsManager::instance().appPrefs.docSetupPrefs.pageHeight;
|
||||
- if (!m_interactive || (flags & LoadSavePlugin::lfInsertPage))
|
||||
+ if (m_Doc && (!m_interactive || (flags & LoadSavePlugin::lfInsertPage)))
|
||||
{
|
||||
m_Doc->setPage(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, false);
|
||||
m_Doc->addPage(0);
|
||||
m_Doc->view()->addPage(0, true);
|
||||
}
|
||||
- else
|
||||
+ else if (!m_Doc || (flags & LoadSavePlugin::lfCreateDoc))
|
||||
{
|
||||
- if (!m_Doc || (flags & LoadSavePlugin::lfCreateDoc))
|
||||
- {
|
||||
- m_Doc = ScCore->primaryMainWindow()->doFileNew(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, 0, 0, 0, 0, 1, "Custom", true);
|
||||
- ScCore->primaryMainWindow()->HaveNewDoc();
|
||||
- ret = true;
|
||||
- }
|
||||
+ m_Doc = ScCore->primaryMainWindow()->doFileNew(docWidth, docHeight, 0, 0, 0, 0, 0, 0, false, 0, 0, 0, 0, 1, "Custom", true);
|
||||
+ ScCore->primaryMainWindow()->HaveNewDoc();
|
||||
+ ret = true;
|
||||
}
|
||||
|
||||
if (ret || !m_interactive)
|
||||
@@ -809,11 +810,15 @@ QImage PdfPlug::readPreview(int pgNum, int width, int
|
||||
bgColor[0] = 255;
|
||||
bgColor[1] = 255;
|
||||
bgColor[2] = 255;
|
||||
- SplashOutputDev *dev = new SplashOutputDev(splashModeXBGR8, 4, false, bgColor, true);
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
+ auto dev = std::make_unique<SplashOutputDev>(splashModeXBGR8, 4, bgColor, true);
|
||||
+#else
|
||||
+ auto dev = std::make_unique<SplashOutputDev>(splashModeXBGR8, 4, false, bgColor, true);
|
||||
+#endif
|
||||
dev->setVectorAntialias(true);
|
||||
dev->setFreeTypeHinting(true, false);
|
||||
dev->startDoc(m_pdfDoc);
|
||||
- m_pdfDoc->displayPage(dev, pgNum, hDPI, vDPI, 0, true, false, false);
|
||||
+ m_pdfDoc->displayPage(dev.get(), pgNum, hDPI, vDPI, 0, true, false, false);
|
||||
SplashBitmap *bitmap = dev->getBitmap();
|
||||
int bw = bitmap->getWidth();
|
||||
int bh = bitmap->getHeight();
|
||||
@@ -851,7 +856,6 @@ QImage PdfPlug::readPreview(int pgNum, int width, int
|
||||
pp.drawRect(cRect);
|
||||
pp.end();
|
||||
}
|
||||
- delete dev;
|
||||
return image;
|
||||
}
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
Fixes for poppler-26.02.0.
|
||||
|
||||
https://github.com/scribusproject/scribus/commit/28bd3be104c06b9d4532affe150f7b74fe5b3e59
|
||||
|
||||
Index: scribus/plugins/import/pdf/pdftextrecognition.cpp
|
||||
--- scribus/plugins/import/pdf/pdftextrecognition.cpp.orig
|
||||
+++ scribus/plugins/import/pdf/pdftextrecognition.cpp
|
||||
@@ -81,7 +81,7 @@ bool PdfTextRecognition::isNewLineOrRegion(const QPoin
|
||||
*/
|
||||
PdfGlyph PdfTextRecognition::AddCharCommon(GfxState* state, double x, double y, double dx, double dy, Unicode const* u, int uLen)
|
||||
{
|
||||
- const double * ctm = state->getCTM();
|
||||
+ const auto ctm = state->getCTM();
|
||||
QTransform trans(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
|
||||
QPointF charDelta1 = trans.map(QPointF(0.0, 0.0));
|
||||
QPointF charDelta2 = trans.map(QPointF(dx, dy));
|
||||
@@ -121,7 +121,7 @@ PdfGlyph PdfTextRecognition::AddFirstChar(GfxState* st
|
||||
setCharMode(AddCharMode::ADDBASICCHAR);
|
||||
|
||||
//only need to be called for the very first point
|
||||
- const double * ctm = state->getCTM();
|
||||
+ const auto ctm = state->getCTM();
|
||||
QTransform trans(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
|
||||
QPointF glyphPos = trans.map(QPointF(x, y));
|
||||
|
||||
@@ -136,7 +136,7 @@ PdfGlyph PdfTextRecognition::AddFirstChar(GfxState* st
|
||||
*/
|
||||
PdfGlyph PdfTextRecognition::AddBasicChar(GfxState* state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, Unicode const* u, int uLen)
|
||||
{
|
||||
- const double * ctm = state->getCTM();
|
||||
+ const auto ctm = state->getCTM();
|
||||
QTransform trans(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
|
||||
|
||||
PdfGlyph newGlyph = AddCharCommon(state, x, y, dx, dy, u, uLen);
|
||||
@@ -461,7 +461,7 @@ PdfTextOutputDev::~PdfTextOutputDev()
|
||||
*/
|
||||
void PdfTextOutputDev::updateTextPos(GfxState* state)
|
||||
{
|
||||
- const double * ctm = state->getCTM();
|
||||
+ const auto ctm = state->getCTM();
|
||||
QTransform trans(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
|
||||
|
||||
QPointF newPosition = trans.map(QPointF(state->getCurX(), state->getCurY()));
|
||||
@@ -1,369 +0,0 @@
|
||||
https://github.com/scribusproject/scribus/commit/28bd3be104c06b9d4532affe150f7b74fe5b3e59,
|
||||
svn r27454 and svn r27497.
|
||||
|
||||
Fixes for poppler-26.02.0, 26.03.0 and 26.04.0.
|
||||
|
||||
Index: scribus/plugins/import/pdf/slaoutput.cpp
|
||||
--- scribus/plugins/import/pdf/slaoutput.cpp.orig
|
||||
+++ scribus/plugins/import/pdf/slaoutput.cpp
|
||||
@@ -123,8 +123,11 @@ LinkImportData::LinkImportData(Object *actionObj)
|
||||
return;
|
||||
|
||||
Object obj3 = getFileSpecNameForPlatform(&obj1);
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 01, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 04, 0)
|
||||
if (!obj3.isNull())
|
||||
+ fileName = make_unique<GooString>(obj3.getString());
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 01, 0)
|
||||
+ if (!obj3.isNull())
|
||||
fileName = obj3.getString()->copy();
|
||||
#else
|
||||
if (!obj3.isNull())
|
||||
@@ -159,14 +162,20 @@ void AnoOutputDev::stroke(GfxState *state)
|
||||
currColorStroke = getColor(state->getStrokeColorSpace(), state->getStrokeColor(), &shade);
|
||||
}
|
||||
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 04, 0)
|
||||
+void AnoOutputDev::drawString(GfxState* state, const std::string& s)
|
||||
+#else
|
||||
void AnoOutputDev::drawString(GfxState *state, const GooString *s)
|
||||
+#endif
|
||||
{
|
||||
int shade = 100;
|
||||
currColorText = getColor(state->getFillColorSpace(), state->getFillColor(), &shade);
|
||||
fontSize = state->getFontSize();
|
||||
if (state->getFont() && state->getFont()->getName())
|
||||
fontName.reset(new GooString(state->getFont()->getName().value()));
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 01, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 04, 0)
|
||||
+ itemText = std::make_unique<GooString>(s);
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 01, 0)
|
||||
itemText = s->copy();
|
||||
#else
|
||||
itemText.reset(s->copy());
|
||||
@@ -884,7 +893,11 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, do
|
||||
const Ref ref = childRef.getRef();
|
||||
radList.append(ref.num);
|
||||
}
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 3, 0)
|
||||
+ QString tmTxt = UnicodeParsedString(annota->getUniqueName());
|
||||
+#else
|
||||
QString tmTxt = UnicodeParsedString(annota->getName());
|
||||
+#endif
|
||||
m_radioMap.insert(tmTxt, radList);
|
||||
}
|
||||
}
|
||||
@@ -1535,7 +1548,7 @@ void SlaOutputDev::eoClip(GfxState *state)
|
||||
|
||||
void SlaOutputDev::adjustClip(GfxState *state, Qt::FillRule fillRule)
|
||||
{
|
||||
- const double *ctm = state->getCTM();
|
||||
+ const auto ctm = state->getCTM();
|
||||
m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
|
||||
QString output = convertPath(state->getPath());
|
||||
if (output.isEmpty())
|
||||
@@ -1563,7 +1576,7 @@ void SlaOutputDev::adjustClip(GfxState *state, Qt::Fil
|
||||
void SlaOutputDev::stroke(GfxState *state)
|
||||
{
|
||||
// qDebug() << "Stroke";
|
||||
- const double *ctm = state->getCTM();
|
||||
+ const auto ctm = state->getCTM();
|
||||
m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
|
||||
double xCoor = m_doc->currentPage()->xOffset();
|
||||
double yCoor = m_doc->currentPage()->yOffset();
|
||||
@@ -1671,8 +1684,7 @@ void SlaOutputDev::eoFill(GfxState *state)
|
||||
|
||||
void SlaOutputDev::createFillItem(GfxState *state, Qt::FillRule fillRule)
|
||||
{
|
||||
- const double *ctm;
|
||||
- ctm = state->getCTM();
|
||||
+ const auto ctm = state->getCTM();
|
||||
m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
|
||||
double xCoor = m_doc->currentPage()->xOffset();
|
||||
double yCoor = m_doc->currentPage()->yOffset();
|
||||
@@ -1799,7 +1811,7 @@ bool SlaOutputDev::axialShadedFill(GfxState *state, Gf
|
||||
out = intersection(m_graphicStack.top().clipPath, out);
|
||||
crect = out.boundingRect();
|
||||
}
|
||||
- const double *ctm = state->getCTM();
|
||||
+ const auto ctm = state->getCTM();
|
||||
m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
|
||||
FPointArray gr;
|
||||
gr.addPoint(GrStartX, GrStartY);
|
||||
@@ -1938,7 +1950,7 @@ bool SlaOutputDev::radialShadedFill(GfxState *state, G
|
||||
double GrFocalY = y1;
|
||||
GrEndX = GrFocalX + r1;
|
||||
GrEndY = GrFocalY;
|
||||
- const double *ctm = state->getCTM();
|
||||
+ const auto ctm = state->getCTM();
|
||||
m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
|
||||
FPointArray gr;
|
||||
gr.addPoint(GrStartX, GrStartY);
|
||||
@@ -2023,7 +2035,7 @@ bool SlaOutputDev::gouraudTriangleShadedFill(GfxState
|
||||
output += QString("Z");
|
||||
m_pathIsClosed = true;
|
||||
m_coords = output;
|
||||
- const double *ctm = state->getCTM();
|
||||
+ const auto ctm = state->getCTM();
|
||||
m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
|
||||
const auto& graphicState = m_graphicStack.top();
|
||||
int z = m_doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, xCoor + crect.x(), yCoor + crect.y(), crect.width(), crect.height(), 0, graphicState.fillColor, CommonStrings::None);
|
||||
@@ -2104,7 +2116,7 @@ bool SlaOutputDev::patchMeshShadedFill(GfxState *state
|
||||
output += QString("Z");
|
||||
m_pathIsClosed = true;
|
||||
m_coords = output;
|
||||
- const double *ctm = state->getCTM();
|
||||
+ const auto ctm = state->getCTM();
|
||||
m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
|
||||
const auto& graphicState = m_graphicStack.top();
|
||||
int z = m_doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, xCoor + crect.x(), yCoor + crect.y(), crect.width(), crect.height(), 0, graphicState.fillColor, CommonStrings::None);
|
||||
@@ -2265,7 +2277,7 @@ bool SlaOutputDev::tilingPatternFill(GfxState *state,
|
||||
box.x2 = bbox[2];
|
||||
box.y2 = bbox[3];
|
||||
|
||||
- const double *ctm = state->getCTM();
|
||||
+ const auto ctm = state->getCTM();
|
||||
m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
|
||||
QTransform mm(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]);
|
||||
QTransform mmx = mm * m_ctm;
|
||||
@@ -2712,7 +2724,7 @@ void SlaOutputDev::drawImage(GfxState *state, Object *
|
||||
void SlaOutputDev::createImageFrame(QImage& image, GfxState *state, int numColorComponents)
|
||||
{
|
||||
// qDebug() << "SlaOutputDev::createImageFrame";
|
||||
- const double *ctm = state->getCTM();
|
||||
+ const auto ctm = state->getCTM();
|
||||
double xCoor = m_doc->currentPage()->xOffset();
|
||||
double yCoor = m_doc->currentPage()->yOffset();
|
||||
|
||||
@@ -2918,8 +2930,13 @@ void SlaOutputDev::beginMarkedContent(const char *name
|
||||
return;
|
||||
QString lName = QString("Layer_%1").arg(m_layerNum + 1);
|
||||
Object obj = properties->lookup("Title");
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 04, 0)
|
||||
if (obj.isString())
|
||||
+ lName = QString(obj.getString().c_str());
|
||||
+#else
|
||||
+ if (obj.isString())
|
||||
lName = QString(obj.getString()->c_str());
|
||||
+#endif
|
||||
for (const auto& layer : m_doc->Layers)
|
||||
{
|
||||
if (layer.Name == lName)
|
||||
@@ -3002,15 +3019,27 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
#else
|
||||
SlaOutFontFileID *id;
|
||||
#endif
|
||||
- SplashFontFile *fontFile;
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
+ std::shared_ptr<SplashFontFile> fontFile;
|
||||
+#else
|
||||
+ SplashFontFile *fontFile = nullptr;
|
||||
+#endif
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
+ std::unique_ptr<SplashFontSrc> fontsrc;
|
||||
+#else
|
||||
SplashFontSrc *fontsrc = nullptr;
|
||||
+#endif
|
||||
Object refObj, strObj;
|
||||
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
std::vector<int> codeToGID;
|
||||
#else
|
||||
int *codeToGID = nullptr;
|
||||
#endif
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
+ std::array<double, 6> textMat;
|
||||
+#else
|
||||
const double *textMat = nullptr;
|
||||
+#endif
|
||||
double m11, m12, m21, m22, fontSize;
|
||||
#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 1, 0)
|
||||
std::array<SplashCoord, 4> mat = { 1.0, 0.0, 0.0, 1.0 };
|
||||
@@ -3070,16 +3099,29 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
fontType = fontLoc->fontType;
|
||||
}
|
||||
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
+ if (!fileName.empty())
|
||||
+ fontsrc = std::make_unique<SplashFontSrc>(fileName);
|
||||
+ else
|
||||
+ fontsrc = std::make_unique<SplashFontSrc>(std::move(tmpBuf.value()));
|
||||
+#else
|
||||
fontsrc = new SplashFontSrc;
|
||||
if (!fileName.empty())
|
||||
fontsrc->setFile(fileName);
|
||||
else
|
||||
fontsrc->setBuf(std::move(tmpBuf.value()));
|
||||
+#endif
|
||||
|
||||
// load the font file
|
||||
switch (fontType) {
|
||||
case fontType1:
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
+ if (!(fontFile = m_fontEngine->loadType1Font(std::move(id), std::move(fontsrc), (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
|
||||
+ {
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
+ goto err2;
|
||||
+ }
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
if (!(fontFile = m_fontEngine->loadType1Font(std::move(id), fontsrc, (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
|
||||
{
|
||||
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
@@ -3094,7 +3136,13 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
#endif
|
||||
break;
|
||||
case fontType1C:
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
+ if (!(fontFile = m_fontEngine->loadType1CFont(std::move(id), std::move(fontsrc), (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
|
||||
+ {
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
+ goto err2;
|
||||
+ }
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
if (!(fontFile = m_fontEngine->loadType1CFont(std::move(id), fontsrc, (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
|
||||
{
|
||||
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
@@ -3109,7 +3157,13 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
#endif
|
||||
break;
|
||||
case fontType1COT:
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
+ if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(std::move(id), std::move(fontsrc), (const char**) ((Gfx8BitFont*) gfxFont)->getEncoding(), fontLoc->fontNum)))
|
||||
+ {
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
+ goto err2;
|
||||
+ }
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(std::move(id), fontsrc, (const char **)((Gfx8BitFont *) gfxFont)->getEncoding(), fontLoc->fontNum)))
|
||||
{
|
||||
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
@@ -3125,10 +3179,15 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
break;
|
||||
case fontTrueType:
|
||||
case fontTrueTypeOT:
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 7, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
if (!fileName.empty())
|
||||
ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum);
|
||||
else
|
||||
+ ff = FoFiTrueType::make(fontsrc->buf(), fontLoc->fontNum);
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 7, 0)
|
||||
+ if (!fileName.empty())
|
||||
+ ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum);
|
||||
+ else
|
||||
ff = FoFiTrueType::make(fontsrc->buf, fontLoc->fontNum);
|
||||
#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
if (!fileName.empty())
|
||||
@@ -3156,7 +3215,13 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
#endif
|
||||
n = 0;
|
||||
}
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), std::move(fontsrc), std::move(codeToGID), fontLoc->fontNum)))
|
||||
+ {
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
+ goto err2;
|
||||
+ }
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, std::move(codeToGID), fontLoc->fontNum)))
|
||||
{
|
||||
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
@@ -3178,7 +3243,13 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
break;
|
||||
case fontCIDType0:
|
||||
case fontCIDType0C:
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
+ if (!(fontFile = m_fontEngine->loadCIDFont(std::move(id), std::move(fontsrc), fontLoc->fontNum)))
|
||||
+ {
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
+ goto err2;
|
||||
+ }
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
if (!(fontFile = m_fontEngine->loadCIDFont(std::move(id), fontsrc, fontLoc->fontNum)))
|
||||
{
|
||||
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
@@ -3217,7 +3288,14 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
n = 0;
|
||||
}
|
||||
#endif
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
+ if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(std::move(id), std::move(fontsrc), std::move(codeToGID), fontLoc->fontNum)))
|
||||
+ {
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
|
||||
+ gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
+ goto err2;
|
||||
+ }
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(std::move(id), fontsrc, std::move(codeToGID), fontLoc->fontNum)))
|
||||
{
|
||||
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
|
||||
@@ -3265,10 +3343,15 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
#endif
|
||||
else
|
||||
{
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 7, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
if (!fileName.empty())
|
||||
ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum);
|
||||
else
|
||||
+ ff = FoFiTrueType::make(fontsrc->buf(), fontLoc->fontNum);
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 7, 0)
|
||||
+ if (!fileName.empty())
|
||||
+ ff = FoFiTrueType::load(fileName.c_str(), fontLoc->fontNum);
|
||||
+ else
|
||||
ff = FoFiTrueType::make(fontsrc->buf, fontLoc->fontNum);
|
||||
#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 11, 0)
|
||||
if (!fileName.empty())
|
||||
@@ -3290,7 +3373,13 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
#endif
|
||||
ff.reset();
|
||||
}
|
||||
-#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
+ if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), std::move(fontsrc), std::move(codeToGID), fontLoc->fontNum)))
|
||||
+ {
|
||||
+ error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
+ goto err2;
|
||||
+ }
|
||||
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(25, 2, 0)
|
||||
if (!(fontFile = m_fontEngine->loadTrueTypeFont(std::move(id), fontsrc, std::move(codeToGID), fontLoc->fontNum)))
|
||||
{
|
||||
error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
|
||||
@@ -3335,8 +3424,10 @@ void SlaOutputDev::updateFont(GfxState *state)
|
||||
mat[3] = -m22;
|
||||
m_font = m_fontEngine->getFont(fontFile, mat, matrix);
|
||||
|
||||
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
if (fontsrc && !fontsrc->isFile)
|
||||
fontsrc->unref();
|
||||
+#endif
|
||||
return;
|
||||
|
||||
err2:
|
||||
@@ -3347,8 +3438,12 @@ err2:
|
||||
#endif
|
||||
|
||||
err1:
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 2, 0)
|
||||
+ fontsrc.reset();
|
||||
+#else
|
||||
if (fontsrc && !fontsrc->isFile)
|
||||
fontsrc->unref();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void SlaOutputDev::drawChar(GfxState* state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, const Unicode* u, int uLen)
|
||||
@@ -3402,7 +3497,7 @@ void SlaOutputDev::drawChar(GfxState* state, double x,
|
||||
if (f & splashPathLast)
|
||||
qPath.closeSubpath();
|
||||
}
|
||||
- const double * ctm = state->getCTM();
|
||||
+ const auto ctm = state->getCTM();
|
||||
m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
|
||||
double xCoor = m_doc->currentPage()->xOffset();
|
||||
double yCoor = m_doc->currentPage()->yOffset();
|
||||
@@ -1,19 +0,0 @@
|
||||
Fix for poppler-26.04.0.
|
||||
|
||||
From svn r27497.
|
||||
|
||||
Index: scribus/plugins/import/pdf/slaoutput.h
|
||||
--- scribus/plugins/import/pdf/slaoutput.h.orig
|
||||
+++ scribus/plugins/import/pdf/slaoutput.h
|
||||
@@ -142,7 +142,11 @@ class AnoOutputDev : public OutputDev (public)
|
||||
void stroke(GfxState *state) override;
|
||||
void eoFill(GfxState *state) override;
|
||||
void fill(GfxState *state) override;
|
||||
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(26, 04, 0)
|
||||
+ void drawString(GfxState* state, const std::string& s) override;
|
||||
+#else
|
||||
void drawString(GfxState *state, const GooString *s) override;
|
||||
+#endif
|
||||
|
||||
QString currColorText;
|
||||
QString currColorFill;
|
||||
@@ -2,11 +2,11 @@
|
||||
lib/scribus/
|
||||
lib/scribus/plugins/
|
||||
lib/scribus/plugins/gettext/
|
||||
@so lib/scribus/plugins/gettext/libMARKDOWNimplugin.so
|
||||
@so lib/scribus/plugins/gettext/libcsvim.so
|
||||
@so lib/scribus/plugins/gettext/libdocim.so
|
||||
@so lib/scribus/plugins/gettext/libdocximplugin.so
|
||||
@so lib/scribus/plugins/gettext/libhtmlim.so
|
||||
@so lib/scribus/plugins/gettext/libmarkdownimplugin.so
|
||||
@so lib/scribus/plugins/gettext/libodtimplugin.so
|
||||
@so lib/scribus/plugins/gettext/libpdbim.so
|
||||
@so lib/scribus/plugins/gettext/librtfimplugin.so
|
||||
@@ -2412,6 +2412,7 @@ share/scribus/loremipsum/sk.xml
|
||||
share/scribus/loremipsum/sl.xml
|
||||
share/scribus/plugins/
|
||||
share/scribus/plugins/barcode.ps
|
||||
share/scribus/plugins/barcode_ui.json
|
||||
share/scribus/plugins/collectionsdb.xml
|
||||
share/scribus/plugins/scribus-short-words.rc
|
||||
share/scribus/profiles/
|
||||
@@ -2747,7 +2748,10 @@ share/scribus/translations/scribus.en_GB.qm
|
||||
share/scribus/translations/scribus.en_US.qm
|
||||
share/scribus/translations/scribus.eo.qm
|
||||
share/scribus/translations/scribus.es_AR.qm
|
||||
share/scribus/translations/scribus.es_CO.qm
|
||||
share/scribus/translations/scribus.es_ES.qm
|
||||
share/scribus/translations/scribus.es_MX.qm
|
||||
share/scribus/translations/scribus.es_VE.qm
|
||||
share/scribus/translations/scribus.et.qm
|
||||
share/scribus/translations/scribus.eu.qm
|
||||
share/scribus/translations/scribus.fa_IR.qm
|
||||
@@ -2758,6 +2762,7 @@ share/scribus/translations/scribus.he_IL.qm
|
||||
share/scribus/translations/scribus.hi_IN.qm
|
||||
share/scribus/translations/scribus.hr_HR.qm
|
||||
share/scribus/translations/scribus.hu.qm
|
||||
share/scribus/translations/scribus.ia.qm
|
||||
share/scribus/translations/scribus.id.qm
|
||||
share/scribus/translations/scribus.it.qm
|
||||
share/scribus/translations/scribus.ja.qm
|
||||
@@ -2773,6 +2778,8 @@ share/scribus/translations/scribus.nb_NO.qm
|
||||
share/scribus/translations/scribus.nl.qm
|
||||
share/scribus/translations/scribus.nn_NO.qm
|
||||
share/scribus/translations/scribus.oc.qm
|
||||
share/scribus/translations/scribus.pa.qm
|
||||
share/scribus/translations/scribus.pa_IN.qm
|
||||
share/scribus/translations/scribus.pl_PL.qm
|
||||
share/scribus/translations/scribus.pms.qm
|
||||
share/scribus/translations/scribus.pt_BR.qm
|
||||
@@ -2791,6 +2798,7 @@ share/scribus/translations/scribus.ta.qm
|
||||
share/scribus/translations/scribus.te.qm
|
||||
share/scribus/translations/scribus.th_TH.qm
|
||||
share/scribus/translations/scribus.tr.qm
|
||||
share/scribus/translations/scribus.tt.qm
|
||||
share/scribus/translations/scribus.uk.qm
|
||||
share/scribus/translations/scribus.zh_CN.qm
|
||||
share/scribus/translations/scribus.zh_TW.qm
|
||||
|
||||
Reference in New Issue
Block a user