Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 3301 → Rev 3303

/trunk/Scribus/scribus/libpostscript/pslib.cpp
119,9 → 119,9
 
if ((fext == "ttf") || (AllFonts[it.key()]->isOTF) || (AllFonts[it.key()]->Subset))
{
FontDesc += "/"+AllFonts[it.key()]->RealName().simplifyWhiteSpace().replace( QRegExp("\\s"), "" )+
FontDesc += "/"+AllFonts[it.key()]->RealName().simplifyWhiteSpace().replace( QRegExp("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]"), "" )+
" "+IToStr(AllFonts[it.key()]->RealGlyphs.count()+1)+" dict def\n";
FontDesc += AllFonts[it.key()]->RealName().simplifyWhiteSpace().replace( QRegExp("\\s"), "" )+" begin\n";
FontDesc += AllFonts[it.key()]->RealName().simplifyWhiteSpace().replace( QRegExp("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]"), "" )+" begin\n";
QMap<uint,FPointArray>::Iterator ig;
for (ig = AllFonts[it.key()]->RealGlyphs.begin();
ig != AllFonts[it.key()]->RealGlyphs.end(); ++ig)
161,13 → 161,13
else
{
UsedFonts.insert(it.key(), "/Fo"+IToStr(a));
Fonts += "/Fo"+IToStr(a)+" /"+AllFonts[it.key()]->RealName().simplifyWhiteSpace().replace( QRegExp("\\s"), "" )+" findfont definefont pop\n";
Fonts += "/Fo"+IToStr(a)+" /"+AllFonts[it.key()]->RealName().simplifyWhiteSpace().replace( QRegExp("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]"), "" )+" findfont definefont pop\n";
if (AllFonts[it.key()]->EmbedPS)
{
QString tmp;
if(AllFonts[it.key()]->EmbedFont(tmp))
{
FontDesc += "%%BeginFont: " + AllFonts[it.key()]->RealName().simplifyWhiteSpace().replace( QRegExp("\\s"), "" ) + "\n";
FontDesc += "%%BeginFont: " + AllFonts[it.key()]->RealName().simplifyWhiteSpace().replace( QRegExp("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]"), "" ) + "\n";
FontDesc += tmp + "\n%%EndFont\n";
}
}
265,7 → 265,7
return Spool.open(IO_WriteOnly);
}
 
void PSLib::PS_begin_doc(int Ori, double x, double y, double breite, double hoehe, int numpage, bool doDev)
void PSLib::PS_begin_doc(int , double x, double y, double breite, double hoehe, int numpage, bool doDev)
{
PutDoc(Header);
PutDoc("%%For: " + User + "\n");
305,19 → 305,11
QString PSLib::PSEncode(QString in)
{
QString tmp = "";
QString cc;
for (uint d = 0; d < in.length(); ++d)
{
cc = in.at(d);
if ((cc == "(") || (cc == ")") || (cc == "\\"))
tmp += "\\";
tmp += cc;
}
tmp = tmp.simplifyWhiteSpace().replace( QRegExp("\\s"), "" );
tmp = in.simplifyWhiteSpace().replace( QRegExp("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]"), "" );
return tmp;
}
 
void PSLib::PS_TemplateStart(QString Name, double breite, double hoehe)
void PSLib::PS_TemplateStart(QString Name, double , double )
{
PutDoc("/"+PSEncode(Name)+"\n{\n");
}
/trunk/Scribus/scribus/libpdf/pdflib.cpp
598,7 → 598,7
PutDoc("\n/Filter /FlateDecode");
PutDoc(" >>\nstream\n"+EncStream(&fon,
ObjCounter-1)+"\nendstream\nendobj\n");
Seite.ImgObjects[AllFonts[it.key()]->RealName().simplifyWhiteSpace().replace( QRegExp("\\s"), "" )+IToStr(ig.key())] =
Seite.ImgObjects[AllFonts[it.key()]->RealName().simplifyWhiteSpace().replace( QRegExp("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]"), "" )+IToStr(ig.key())] =
ObjCounter-1;
fon = "";
}
725,7 → 725,7
}
StartObj(ObjCounter);
PutDoc("<<\n/Type /FontDescriptor\n");
PutDoc("/FontName /"+AllFonts[it.key()]->RealName().simplifyWhiteSpace().replace( QRegExp("\\s"), "" )+"\n");
PutDoc("/FontName /"+AllFonts[it.key()]->RealName().simplifyWhiteSpace().replace( QRegExp("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]"), "" )+"\n");
PutDoc("/FontBBox [ "+AllFonts[it.key()]->FontBBox+" ]\n");
PutDoc("/Flags ");
QFontInfo fo = QFontInfo(it.data());
799,7 → 799,7
PutDoc("<<\n/Type /Font\n/Subtype ");
PutDoc(((fext == "ttf") || (fext == "otf")) ? "/TrueType\n" : "/Type1\n");
PutDoc("/Name /Fo"+IToStr(a)+"S"+IToStr(Fc)+"\n");
PutDoc("/BaseFont /"+AllFonts[it.key()]->RealName().simplifyWhiteSpace().replace( QRegExp("\\s"), "" )+"\n");
PutDoc("/BaseFont /"+AllFonts[it.key()]->RealName().simplifyWhiteSpace().replace( QRegExp("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]"), "" )+"\n");
PutDoc("/FirstChar 0\n");
PutDoc("/LastChar "+IToStr(chCount-1)+"\n");
PutDoc("/Widths "+IToStr(ObjCounter-2)+" 0 R\n");
1247,7 → 1247,7
if ((Options->Compress) && (CompAvail))
PutDoc("\n/Filter /FlateDecode");
PutDoc(" >>\nstream\n"+EncStream(&Inhalt, ObjCounter-1)+"\nendstream\nendobj\n");
QString name = pag->PageNam.simplifyWhiteSpace().replace( QRegExp("\\s"), "" ) + IToStr(ite->ItemNr);
QString name = pag->PageNam.simplifyWhiteSpace().replace( QRegExp("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]"), "" ) + IToStr(ite->ItemNr);
Seite.XObjects[name] = ObjCounter-1;
}
}
1421,7 → 1421,7
ite = mPage->Items.at(am);
if ((ite->LayerNr != ll.LNr) || (!ite->isPrintable))
continue;
QString name = "/"+pag->MPageNam.simplifyWhiteSpace().replace( QRegExp("\\s"), "" ) + IToStr(ite->ItemNr);
QString name = "/"+pag->MPageNam.simplifyWhiteSpace().replace( QRegExp("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]"), "" ) + IToStr(ite->ItemNr);
if (ite->PType != 4)
PutPage(name+" Do\n");
else
2467,7 → 2467,7
tmp2 += FToStr(tsz / 10.0)+" 0 0 "+FToStr(tsz / 10.0)+" 0 "+FToStr(((tsz / 10.0)))+" cm\n";
}
tmp2 += FToStr(QMIN(QMAX(hl->cscale, 25), 400) / 100.0)+" 0 0 1 0 0 cm\n";
tmp2 += "/"+(*doc->AllFonts)[hl->cfont]->RealName().replace( QRegExp("\\s"), "" )+IToStr(chr)+" Do\n";
tmp2 += "/"+(*doc->AllFonts)[hl->cfont]->RealName().replace( QRegExp("[\\s\\/\\{\\[\\]\\}\\<\\>\\(\\)\\%]"), "" )+IToStr(chr)+" Do\n";
if (hl->cstyle & 4)
{
FPointArray gly = (*doc->AllFonts)[hl->cfont]->GlyphArray[chr].Outlines.copy();