Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 1787 → Rev 1788

/branches/Version13x/Scribus/scribus/fileloader.cpp
224,8 → 224,8
{
for (uint e = 0; e < it->itemText.count(); ++e)
{
if (!app->doc->UsedFonts.contains(it->itemText.at(e)->cfont->SCName))
it->itemText.at(e)->cfont = (*app->doc->AllFonts)[ReplacedFonts[it->itemText.at(e)->cfont->SCName]];
if (!app->doc->UsedFonts.contains(it->itemText.at(e)->cfont))
it->itemText.at(e)->cfont = ReplacedFonts[it->itemText.at(e)->cfont];
}
}
}
238,8 → 238,8
{
for (uint e = 0; e < it->itemText.count(); ++e)
{
if (!app->doc->UsedFonts.contains(it->itemText.at(e)->cfont->SCName))
it->itemText.at(e)->cfont = (*app->doc->AllFonts)[ReplacedFonts[it->itemText.at(e)->cfont->SCName]];
if (!app->doc->UsedFonts.contains(it->itemText.at(e)->cfont))
it->itemText.at(e)->cfont = ReplacedFonts[it->itemText.at(e)->cfont];
}
}
}
1075,7 → 1075,7
hg->ch = QChar(13);
if (hg->ch == QChar(4))
hg->ch = QChar(9);
hg->cfont = (*doc->AllFonts)[tmpf];
hg->cfont = tmpf;
hg->csize = size;
hg->ccolor = fcolor;
hg->cextra = extra;
1205,6 → 1205,7
b->setImageFlippedH(QStoInt(obj->attribute("FLIPPEDH")));
b->setImageFlippedV(QStoInt(obj->attribute("FLIPPEDV")));
b->RadRect = QStodouble(obj->attribute("RADRECT","0"));
b->FrameType = pt;
b->ClipEdited = QStoInt(obj->attribute("CLIPEDIT", "0"));
b->setFillColor(Pcolor);
b->setLineColor(Pcolor2);
/branches/Version13x/Scribus/scribus/gtaction.cpp
137,9 → 137,9
if ((inPara) && (!overridePStyleFont))
{
if (ScApp->doc->docParagraphStyles[paragraphStyle].Font == "")
hg->cfont = (*ScApp->doc->AllFonts)[fontName2];
hg->cfont = fontName2;
else
hg->cfont = (*ScApp->doc->AllFonts)[ScApp->doc->docParagraphStyles[paragraphStyle].Font];
hg->cfont = ScApp->doc->docParagraphStyles[paragraphStyle].Font;
hg->csize = ScApp->doc->docParagraphStyles[paragraphStyle].FontSize;
hg->ccolor = ScApp->doc->docParagraphStyles[paragraphStyle].FColor;
hg->cshade = ScApp->doc->docParagraphStyles[paragraphStyle].FShade;
149,7 → 149,7
}
else
{
hg->cfont = (*ScApp->doc->AllFonts)[fontName];
hg->cfont = fontName;
hg->csize = font->getSize();
hg->ccolor = parseColor(font->getColor());
hg->cshade = font->getShade();
/branches/Version13x/Scribus/scribus/mpalette.cpp
1,5 → 1,3
 
#include "scfonts.h"
#include "mpalette.h"
#include "mpalette.moc"
#include <cmath>
/branches/Version13x/Scribus/scribus/util.cpp
131,8 → 131,8
QPixmap loadIcon(QString nam);
uint getDouble(QString in, bool raw);
bool loadText(QString nam, QString *Buffer);
double Cwidth(ScribusDoc *currentDoc, Foi* name, QString ch, int Siz, QString ch2 = " ");
double RealCWidth(ScribusDoc *currentDoc, Foi* name, QString ch, int Siz);
double Cwidth(ScribusDoc *currentDoc, QString name, QString ch, int Siz, QString ch2 = " ");
double RealCWidth(ScribusDoc *currentDoc, QString name, QString ch, int Siz);
double QStodouble(QString in);
int QStoInt(QString in);
QString GetAttr(QDomElement *el, QString at, QString def="0");
2561,7 → 2561,7
return ret;
}
 
double Cwidth(ScribusDoc *currentDoc, Foi* name, QString ch, int Size, QString ch2)
double Cwidth(ScribusDoc *currentDoc, QString name, QString ch, int Size, QString ch2)
{
double width;
FT_Vector delta;
2568,16 → 2568,17
FT_Face face;
uint c1 = ch.at(0).unicode();
uint c2 = ch2.at(0).unicode();
if (name->CharWidth.contains(c1))
Foi* fo = (*currentDoc->AllFonts)[name];
if (fo->CharWidth.contains(c1))
{
width = name->CharWidth[c1]*(Size / 10.0);
if (name->HasKern)
width = fo->CharWidth[c1]*(Size / 10.0);
if (fo->HasKern)
{
face = currentDoc->FFonts[name->SCName];
face = currentDoc->FFonts[name];
uint cl = FT_Get_Char_Index(face, c1);
uint cr = FT_Get_Char_Index(face, c2);
FT_Get_Kerning(face, cl, cr, ft_kerning_unscaled, &delta);
width += delta.x / name->uniEM * (Size / 10.0);
width += delta.x / fo->uniEM * (Size / 10.0);
}
return width;
}
2585,18 → 2586,19
return static_cast<double>(Size / 10.0);
}
 
double RealCWidth(ScribusDoc *currentDoc, Foi* name, QString ch, int Size)
double RealCWidth(ScribusDoc *currentDoc, QString name, QString ch, int Size)
{
double w, ww;
uint c1 = ch.at(0).unicode();
FT_Face face;
uint c1 = ch.at(0).unicode();
if (name->CharWidth.contains(c1))
Foi* fo = (*currentDoc->AllFonts)[name];
if (fo->CharWidth.contains(c1))
{
face = currentDoc->FFonts[name->SCName];
face = currentDoc->FFonts[name];
uint cl = FT_Get_Char_Index(face, c1);
FT_Load_Glyph( face, cl, FT_LOAD_NO_SCALE | FT_LOAD_NO_BITMAP );
w = (face->glyph->metrics.width + fabs((double)face->glyph->metrics.horiBearingX)) / name->uniEM * (Size / 10.0);
ww = face->glyph->metrics.horiAdvance / name->uniEM * (Size / 10.0);
FT_Load_Glyph(face, cl, FT_LOAD_NO_SCALE | FT_LOAD_NO_BITMAP );
w = (face->glyph->metrics.width + fabs((double)face->glyph->metrics.horiBearingX)) / fo->uniEM * (Size / 10.0);
ww = face->glyph->metrics.horiAdvance / fo->uniEM * (Size / 10.0);
return QMAX(ww, w);
}
else
3580,7 → 3582,7
Text += QString(QChar(4))+"\t";
else
Text += b->itemText.at(a)->ch+"\t";
Text += b->itemText.at(a)->cfont->SCName+"\t";
Text += b->itemText.at(a)->cfont+"\t";
Text += QString::number(b->itemText.at(a)->csize / 10.0)+"\t";
Text += b->itemText.at(a)->ccolor+"\t";
Text += QString::number(b->itemText.at(a)->cextra)+"\t";
/branches/Version13x/Scribus/scribus/buttonicon.cpp
1,5 → 1,3
 
#include "scfonts.h"
#include "buttonicon.h"
#include "buttonicon.moc"
extern QPixmap loadIcon(QString nam);
/branches/Version13x/Scribus/scribus/gtwriter.cpp
19,7 → 19,6
***************************************************************************/
 
#include "gtwriter.h"
#include "scfonts.h"
#include "pageitem.h"
 
gtWriter::gtWriter(bool append)
/branches/Version13x/Scribus/scribus/search.cpp
419,7 → 419,7
}
if (SFont->isChecked())
{
if (Item->itemText.at(a)->cfont->SCName != sFont)
if (Item->itemText.at(a)->cfont != sFont)
found = false;
}
if (SStyle->isChecked())
705,14 → 705,14
hg->cab = Doc->currentParaStyle;
if (Doc->docParagraphStyles[hg->cab].Font != "")
{
hg->cfont = (*Doc->AllFonts)[Doc->docParagraphStyles[hg->cab].Font];
hg->cfont = Doc->docParagraphStyles[hg->cab].Font;
hg->csize = Doc->docParagraphStyles[hg->cab].FontSize;
hg->cstyle = Doc->docParagraphStyles[hg->cab].FontEffect;
}
if (RFont->isChecked())
hg->cfont = (*Doc->AllFonts)[RFontVal->currentText()];
hg->cfont = RFontVal->currentText();
else
hg->cfont = (*Doc->AllFonts)[Doc->CurrFont];
hg->cfont = Doc->CurrFont;
hg->cextra = 0;
hg->xp = 0;
hg->yp = 0;
719,7 → 719,7
hg->PRot = 0;
hg->PtransX = 0;
hg->PtransY = 0;
Item->itemText.insert(ReplStart+cx, hg);
Item->itemText.insert(ReplStart+cx, hg);
}
Item->CPos = ReplStart+cx;
}
/branches/Version13x/Scribus/scribus/serializer.cpp
83,7 → 83,7
hg->ch = QChar(13);
if (doku->docParagraphStyles[Absatz].Font != "")
{
hg->cfont = (*doku->AllFonts)[doku->docParagraphStyles[Absatz].Font];
hg->cfont = doku->docParagraphStyles[Absatz].Font;
hg->csize = doku->docParagraphStyles[Absatz].FontSize;
hg->cstyle = doku->docParagraphStyles[Absatz].FontEffect;
hg->ccolor = doku->docParagraphStyles[Absatz].FColor;
93,7 → 93,7
}
else
{
hg->cfont = (*doku->AllFonts)[font];
hg->cfont = font;
hg->ccolor = it->TxtFill;
hg->cshade = it->ShTxtFill;
hg->cstroke = it->TxtStroke;
/branches/Version13x/Scribus/scribus/annot.cpp
6,7 → 6,6
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "scfonts.h"
#include "annot.h"
#include "annot.moc"
#include "editor.h"
/branches/Version13x/Scribus/scribus/scribusdoc.cpp
526,11 → 526,11
 
bool ScribusDoc::AddFont(QString name, QFont fo)
{
if (UsedFonts.contains(name))
return true;
bool ret = false;
bool error;
FT_Face face;
if (UsedFonts.contains(name))
return true;
error = FT_New_Face( library, (*AllFonts)[name]->Datei, 0, &face );
if (error)
return ret;
/branches/Version13x/Scribus/scribus/charselect.cpp
684,7 → 684,7
hg->ch = QChar(13);
if (hg->ch == QChar(9))
hg->ch = " ";
hg->cfont = (*ap->doc->AllFonts)[fontInUse];
hg->cfont = fontInUse;
hg->csize = ap->doc->CurrFontSize;
hg->ccolor = ap->doc->CurrTextFill;
hg->cshade = ap->doc->CurrTextFillSh;
696,7 → 696,7
hg->cab = ap->doc->currentParaStyle;
if (ap->doc->docParagraphStyles[ap->doc->currentParaStyle].Font != "")
{
hg->cfont = (*ap->doc->AllFonts)[ap->doc->docParagraphStyles[ap->doc->currentParaStyle].Font];
hg->cfont = ap->doc->docParagraphStyles[ap->doc->currentParaStyle].Font;
hg->csize = ap->doc->docParagraphStyles[ap->doc->currentParaStyle].FontSize;
}
hg->cextra = 0;
/branches/Version13x/Scribus/scribus/gtgettext.h
34,7 → 34,6
#include "config.h"
#include "gtdialogs.h"
#include "gtwriter.h"
#include "scfonts.h"
#include "pageitem.h"
 
struct ImporterData {
/branches/Version13x/Scribus/scribus/scribusXml.cpp
2209,7 → 2209,7
{
QDomElement it=docu.createElement("ITEXT");
ts = item->itemText.at(k)->csize / 10.0;
tf = item->itemText.at(k)->cfont->SCName;
tf = item->itemText.at(k)->cfont;
tc = item->itemText.at(k)->ccolor;
te = item->itemText.at(k)->cextra;
tsh = item->itemText.at(k)->cshade;
2245,7 → 2245,7
break;
}
ts2 = item->itemText.at(k)->csize / 10.0;
tf2 = item->itemText.at(k)->cfont->SCName;
tf2 = item->itemText.at(k)->cfont;
tc2 = item->itemText.at(k)->ccolor;
te2 = item->itemText.at(k)->cextra;
tsh2 = item->itemText.at(k)->cshade;
2278,7 → 2278,7
if (k == item->itemText.count())
break;
ts2 = item->itemText.at(k)->csize / 10.0;
tf2 = item->itemText.at(k)->cfont->SCName;
tf2 = item->itemText.at(k)->cfont;
tc2 = item->itemText.at(k)->ccolor;
te2 = item->itemText.at(k)->cextra;
tsh2 = item->itemText.at(k)->cshade;
2425,7 → 2425,7
{
QDomElement it=docu->createElement("ITEXT");
ts = item->itemText.at(k)->csize / 10.0;
tf = item->itemText.at(k)->cfont->SCName;
tf = item->itemText.at(k)->cfont;
tc = item->itemText.at(k)->ccolor;
te = item->itemText.at(k)->cextra;
tsh = item->itemText.at(k)->cshade;
2458,7 → 2458,7
break;
}
ts2 = item->itemText.at(k)->csize / 10.0;
tf2 = item->itemText.at(k)->cfont->SCName;
tf2 = item->itemText.at(k)->cfont;
tc2 = item->itemText.at(k)->ccolor;
te2 = item->itemText.at(k)->cextra;
tsh2 = item->itemText.at(k)->cshade;
2488,7 → 2488,7
if (k == item->itemText.count())
break;
ts2 = item->itemText.at(k)->csize / 10.0;
tf2 = item->itemText.at(k)->cfont->SCName;
tf2 = item->itemText.at(k)->cfont;
tc2 = item->itemText.at(k)->ccolor;
te2 = item->itemText.at(k)->cextra;
tsh2 = item->itemText.at(k)->cshade;
/branches/Version13x/Scribus/scribus/story.cpp
14,7 → 14,6
* (at your option) any later version. *
* *
***************************************************************************/
#include "scfonts.h"
#include "story.h"
#include "story.moc"
#include <qtooltip.h>
618,7 → 617,7
chars = StyledText.at(p-1);
if (chars->count() != 0)
{
hg->cfont = (*doc->AllFonts)[chars->at(c)->cfont];
hg->cfont = chars->at(c)->cfont;
hg->csize = chars->at(c)->csize;
hg->ccolor = chars->at(c)->ccolor;
hg->cshade = chars->at(c)->cshade;
634,7 → 633,7
hg->cshade = CurrTextFillSh;
hg->cstroke = CurrTextStroke;
hg->cshade2 = CurrTextStrokeSh;
hg->cfont = (*doc->AllFonts)[CurrFont];
hg->cfont = CurrFont;
hg->csize = CurrFontSize;
hg->cstyle = CurrentStyle;
hg->cextra = CurrTextKern;
641,7 → 640,7
hg->cscale = CurrTextScale;
if (doc->docParagraphStyles[ParagStyles[p-1]].Font != "")
{
hg->cfont = (*doc->AllFonts)[doc->docParagraphStyles[ParagStyles[p-1]].Font];
hg->cfont = doc->docParagraphStyles[ParagStyles[p-1]].Font;
hg->csize = doc->docParagraphStyles[ParagStyles[p-1]].FontSize;
}
}
660,7 → 659,7
struct ScText *hg;
hg = new ScText;
hg->ch = chars->at(c)->ch;
hg->cfont = (*doc->AllFonts)[chars->at(c)->cfont];
hg->cfont = chars->at(c)->cfont;
hg->csize = chars->at(c)->csize;
hg->ccolor = chars->at(c)->ccolor;
hg->cshade = chars->at(c)->cshade;
768,7 → 767,7
{
hg = new PtiSmall;
hg->ch = nb->itemText.at(a)->ch;
hg->cfont = nb->itemText.at(a)->cfont->SCName;
hg->cfont = nb->itemText.at(a)->cfont;
hg->csize = nb->itemText.at(a)->csize;
hg->ccolor = nb->itemText.at(a)->ccolor;
hg->cshade = nb->itemText.at(a)->cshade;
/branches/Version13x/Scribus/scribus/pageitem.h
32,7 → 32,6
class ScribusDoc;
class UndoManager;
class UndoState;
class Foi;
/**
*@author Franz Schmid
*/
166,7 → 165,7
QString Zeich;
QString Farb;
QString Farb2;
Foi* ZFo;
QString ZFo;
};
 
ObjAttrVector* getObjectAttributes();
/branches/Version13x/Scribus/scribus/scribusstructs.h
35,7 → 35,7
float PtransX;
float PtransY;
float PRot;
Foi* cfont;
QString cfont;
QString ccolor;
QString cstroke;
QString ch;
/branches/Version13x/Scribus/scribus/pageitem.cpp
46,8 → 46,8
 
using namespace std;
 
extern double Cwidth(ScribusDoc *doc, Foi* name, QString ch, int Siz, QString ch2 = " ");
extern double RealCWidth(ScribusDoc *doc, Foi* name, QString ch, int Siz);
extern double Cwidth(ScribusDoc *doc, QString name, QString ch, int Siz, QString ch2 = " ");
extern double RealCWidth(ScribusDoc *doc, QString name, QString ch, int Siz);
extern QPointArray FlattenPath(FPointArray ina, QValueList<uint> &Segs);
extern double xy2Deg(double x, double y);
extern void BezierPoints(QPointArray *ar, QPoint n1, QPoint n2, QPoint n3, QPoint n4);
684,8 → 684,8
Zli3.scale = hl->cscale;
if (!Doc->RePos)
{
desc = static_cast<int>(Zli3.ZFo->numDescender * (-Zli3.Siz / 10.0));
asce = static_cast<int>(Zli3.ZFo->numAscent * (Zli3.Siz / 10.0));
desc = static_cast<int>((*Doc->AllFonts)[Zli3.ZFo]->numDescender * (-Zli3.Siz / 10.0));
asce = static_cast<int>((*Doc->AllFonts)[Zli3.ZFo]->numAscent * (Zli3.Siz / 10.0));
if (e2.intersects(pf2.xForm(QRect(qRound(Zli3.xco),qRound(Zli3.yco-asce), qRound(Zli3.wide+1), qRound(asce+desc)))))
DrawZeichenS(p, &Zli3);
if (hl->cstyle & 512)
808,7 → 808,7
}
else
chs = hl->csize;
desc2 = -hl->cfont->numDescender * (chs / 10.0);
desc2 = -(*Doc->AllFonts)[hl->cfont]->numDescender * (chs / 10.0);
CurY = TExtra+lineCorr;
}
else
912,13 → 912,13
{
if (Doc->docParagraphStyles[hl->cab].BaseAdj)
{
chsd = qRound(10 * ((Doc->typographicSetttings.valueBaseGrid * DropLines) / (hl->cfont->numAscent+hl->cfont->numDescender)));
chs = qRound(10 * ((Doc->typographicSetttings.valueBaseGrid * DropLines) / hl->cfont->numAscent));
chsd = qRound(10 * ((Doc->typographicSetttings.valueBaseGrid * DropLines) / ((*Doc->AllFonts)[hl->cfont]->numAscent+(*Doc->AllFonts)[hl->cfont]->numDescender)));
chs = qRound(10 * ((Doc->typographicSetttings.valueBaseGrid * DropLines) / (*Doc->AllFonts)[hl->cfont]->numAscent));
}
else
{
chsd = qRound(10 * ((Doc->docParagraphStyles[absa].LineSpa * DropLines) / (hl->cfont->numAscent+hl->cfont->numDescender)));
chs = qRound(10 * ((Doc->docParagraphStyles[absa].LineSpa * DropLines) / hl->cfont->numAscent));
chsd = qRound(10 * ((Doc->docParagraphStyles[absa].LineSpa * DropLines) / ((*Doc->AllFonts)[hl->cfont]->numAscent+(*Doc->AllFonts)[hl->cfont]->numDescender)));
chs = qRound(10 * ((Doc->docParagraphStyles[absa].LineSpa * DropLines) / (*Doc->AllFonts)[hl->cfont]->numAscent));
}
hl->csize = chsd;
}
944,13 → 944,13
wide = RealCWidth(Doc, hl->cfont, chx2, chsd);
desc2 = 0;
desc = 0;
asce = qRound(hl->cfont->numAscent * (chs / 10.0));
asce = qRound((*Doc->AllFonts)[hl->cfont]->numAscent * (chs / 10.0));
}
else
{
desc2 = -hl->cfont->numDescender * (chs / 10.0);
desc = qRound(-hl->cfont->numDescender * (chs / 10.0));
asce = qRound(hl->cfont->numAscent * (chs / 10.0));
desc2 = -(*Doc->AllFonts)[hl->cfont]->numDescender * (chs / 10.0);
desc = qRound(-(*Doc->AllFonts)[hl->cfont]->numDescender * (chs / 10.0));
asce = qRound((*Doc->AllFonts)[hl->cfont]->numAscent * (chs / 10.0));
}
wide = wide * (hl->cscale / 100.0);
fBorder = false;
1039,9 → 1039,9
if (DropCmode)
{
if (Doc->docParagraphStyles[hl->cab].BaseAdj)
desc2 = -hl->cfont->numDescender * Doc->typographicSetttings.valueBaseGrid * Doc->docParagraphStyles[hl->cab].DropLin;
desc2 = -(*Doc->AllFonts)[hl->cfont]->numDescender * Doc->typographicSetttings.valueBaseGrid * Doc->docParagraphStyles[hl->cab].DropLin;
else
desc2 = -hl->cfont->numDescender * Doc->docParagraphStyles[hl->cab].LineSpa * Doc->docParagraphStyles[hl->cab].DropLin;
desc2 = -(*Doc->AllFonts)[hl->cfont]->numDescender * Doc->docParagraphStyles[hl->cab].LineSpa * Doc->docParagraphStyles[hl->cab].DropLin;
}
if (DropCmode)
DropLines = Doc->docParagraphStyles[hl->cab].DropLin;
1499,8 → 1499,8
SetFarbe(&tmp, Zli2->Farb, Zli2->shade);
p->setBrush(tmp);
}
desc = static_cast<int>(Zli2->ZFo->numDescender * (-Zli2->Siz / 10.0));
asce = static_cast<int>(Zli2->ZFo->numAscent * (Zli2->Siz / 10.0));
desc = static_cast<int>((*Doc->AllFonts)[Zli2->ZFo]->numDescender * (-Zli2->Siz / 10.0));
asce = static_cast<int>((*Doc->AllFonts)[Zli2->ZFo]->numAscent * (Zli2->Siz / 10.0));
if ((((Zli2->Sele) && (Select)) || (((NextBox != 0) || (BackBox != 0)) && (Zli2->Sele))) && (Doc->appMode == EditMode))
{
wide = Zli2->wide;
1599,8 → 1599,8
SetFarbe(&tmp, Zli2->Farb, Zli2->shade);
p->setBrush(tmp);
}
desc = qRound(Zli2->ZFo->numDescender * (-Zli2->Siz / 10.0));
asce = qRound(Zli2->ZFo->numAscent * (Zli2->Siz / 10.0));
desc = qRound((*Doc->AllFonts)[Zli2->ZFo]->numDescender * (-Zli2->Siz / 10.0));
asce = qRound((*Doc->AllFonts)[Zli2->ZFo]->numAscent * (Zli2->Siz / 10.0));
if ((((Zli2->Sele) && (Select)) || (((NextBox != 0) || (BackBox != 0)) && (Zli2->Sele))) && (Doc->appMode == EditMode))
{
wide = Zli2->wide;
2241,7 → 2241,7
double PageItem::SetZeichAttr(struct ScText *hl, int *chs, QString *chx)
{
double retval = 0.0;
double asce = hl->cfont->numAscent * (hl->csize / 10.0);
double asce = (*Doc->AllFonts)[hl->cfont]->numAscent * (hl->csize / 10.0);
int chst = hl->cstyle & 127;
if (chst != 0)
{
2276,12 → 2276,12
ccx = " ";
double csi = static_cast<double>(hl->Siz) / 100.0;
uint chr = ccx[0].unicode();
if (hl->ZFo->CharWidth.contains(chr))
if ((*Doc->AllFonts)[hl->ZFo]->CharWidth.contains(chr))
{
QWMatrix chma, chma2, chma3, chma4, chma5;
chma.scale(csi, csi);
chma5.scale(p->zoomFactor(), p->zoomFactor());
FPointArray gly = hl->ZFo->GlyphArray[chr].Outlines.copy();
FPointArray gly = (*Doc->AllFonts)[hl->ZFo]->GlyphArray[chr].Outlines.copy();
if (gly.size() > 3)
{
chma2.scale(hl->scale / 100.0, 1);
2296,11 → 2296,11
gly.map(chma * chma2 * chma3 * chma4 * chma5);
p->setFillMode(1);
p->setupTextPolygon(&gly);
if (hl->ZFo->isStroked)
if ((*Doc->AllFonts)[hl->ZFo]->isStroked)
{
QColor tmp = p->brush();
p->setPen(tmp, 1, SolidLine, FlatCap, MiterJoin);
p->setLineWidth(QMAX(hl->ZFo->strokeWidth * (hl->Siz / 10.0) / 2, 1));
p->setLineWidth(QMAX((*Doc->AllFonts)[hl->ZFo]->strokeWidth * (hl->Siz / 10.0) / 2, 1));
p->strokePath();
}
else
2309,7 → 2309,7
p->fillPath();
if ((hl->Style & 4) && (hl->Farb2 != "None"))
{
p->setLineWidth(QMAX(hl->ZFo->strokeWidth * (hl->Siz / 10.0) / 2, 1));
p->setLineWidth(QMAX((*Doc->AllFonts)[hl->ZFo]->strokeWidth * (hl->Siz / 10.0) / 2, 1));
p->strokePath();
}
}
2317,15 → 2317,15
if (hl->Style & 16)
{
p->setPen(p->brush());
double st = hl->ZFo->strikeout_pos * (hl->Siz / 10.0);
p->setLineWidth(QMAX(hl->ZFo->strokeWidth * (hl->Siz / 10.0), 1));
double st = (*Doc->AllFonts)[hl->ZFo]->strikeout_pos * (hl->Siz / 10.0);
p->setLineWidth(QMAX((*Doc->AllFonts)[hl->ZFo]->strokeWidth * (hl->Siz / 10.0), 1));
p->drawLine(FPoint(hl->xco-hl->kern, hl->yco-st), FPoint(hl->xco+hl->wide, hl->yco-st));
}
if (hl->Style & 8)
{
double st = hl->ZFo->underline_pos * (hl->Siz / 10.0);
double st = (*Doc->AllFonts)[hl->ZFo]->underline_pos * (hl->Siz / 10.0);
p->setPen(p->brush());
p->setLineWidth(QMAX(hl->ZFo->strokeWidth * (hl->Siz / 10.0), 1));
p->setLineWidth(QMAX((*Doc->AllFonts)[hl->ZFo]->strokeWidth * (hl->Siz / 10.0), 1));
p->drawLine(FPoint(hl->xco-hl->kern, hl->yco-st), FPoint(hl->xco+hl->wide, hl->yco-st));
}
}
/branches/Version13x/Scribus/scribus/scribusview.cpp
76,7 → 76,7
using namespace std;
 
extern void Level2Layer(ScribusDoc *doc, struct Layer *ll, int Level);
extern double Cwidth(ScribusDoc *doc, Foi* name, QString ch, int Siz, QString ch2 = " ");
extern double Cwidth(ScribusDoc *doc, QString name, QString ch, int Siz, QString ch2 = " ");
extern ScribusApp* ScApp;
extern QPointArray FlattenPath(FPointArray ina, QValueList<uint> &Segs);
extern QPixmap loadIcon(QString nam);
5041,8 → 5041,8
for (uint a = 0; a < b->itemText.count(); ++a)
{
hl = b->itemText.at(a);
int des = static_cast<int>(hl->cfont->numDescender * (-hl->csize / 10.0));
int asc = static_cast<int>(hl->cfont->numAscent * (hl->csize / 10.0));
int des = static_cast<int>((*Doc->AllFonts)[hl->cfont]->numDescender * (-hl->csize / 10.0));
int asc = static_cast<int>((*Doc->AllFonts)[hl->cfont]->numAscent * (hl->csize / 10.0));
if (asc > asce)
asce = asc;
if (des > desc)
6381,7 → 6381,7
{
b->CPos = a;
p.end();
Doc->CurrFont = b->itemText.at(a)->cfont->SCName;
Doc->CurrFont = b->itemText.at(a)->cfont;
Doc->CurrFontSize = b->itemText.at(a)->csize;
Doc->CurrTextFill = b->itemText.at(a)->ccolor;
Doc->CurrTextFillSh = b->itemText.at(a)->cshade;
6389,7 → 6389,7
Doc->CurrTextStrokeSh = b->itemText.at(a)->cshade2;
Doc->CurrTextScale = b->itemText.at(a)->cscale;
emit ItemTextSca(b->itemText.at(a)->cscale);
emit ItemTextFont(b->itemText.at(a)->cfont->SCName);
emit ItemTextFont(b->itemText.at(a)->cfont);
emit ItemTextSize(b->itemText.at(a)->csize);
emit ItemTextUSval(b->itemText.at(a)->cextra);
emit ItemTextStil(b->itemText.at(a)->cstyle);
6412,7 → 6412,7
i = a - 1;
else
i = a;
Doc->CurrFont = b->itemText.at(i)->cfont->SCName;
Doc->CurrFont = b->itemText.at(i)->cfont;
Doc->CurrFontSize = b->itemText.at(i)->csize;
Doc->CurrTextFill = b->itemText.at(i)->ccolor;
Doc->CurrTextFillSh = b->itemText.at(i)->cshade;
6421,7 → 6421,7
Doc->CurrTextScale = b->itemText.at(i)->cscale;
emit ItemTextSca(b->itemText.at(i)->cscale);
emit ItemTextFarben(b->itemText.at(i)->cstroke, b->itemText.at(i)->ccolor, b->itemText.at(i)->cshade2, b->itemText.at(i)->cshade);
emit ItemTextFont(b->itemText.at(i)->cfont->SCName);
emit ItemTextFont(b->itemText.at(i)->cfont);
emit ItemTextSize(b->itemText.at(i)->csize);
emit ItemTextUSval(b->itemText.at(i)->cextra);
emit ItemTextStil(b->itemText.at(i)->cstyle);
6432,7 → 6432,7
b->CPos = b->itemText.count();
if (b->itemText.count() != 0)
{
Doc->CurrFont = b->itemText.at(b->CPos-1)->cfont->SCName;
Doc->CurrFont = b->itemText.at(b->CPos-1)->cfont;
Doc->CurrFontSize = b->itemText.at(b->CPos-1)->csize;
Doc->CurrTextFill = b->itemText.at(b->CPos-1)->ccolor;
Doc->CurrTextFillSh = b->itemText.at(b->CPos-1)->cshade;
6441,7 → 6441,7
Doc->CurrTextScale = b->itemText.at(b->CPos-1)->cscale;
emit ItemTextSca(b->itemText.at(b->CPos-1)->cscale);
emit ItemTextFarben(b->itemText.at(b->CPos-1)->cstroke, b->itemText.at(b->CPos-1)->ccolor, b->itemText.at(b->CPos-1)->cshade2, b->itemText.at(b->CPos-1)->cshade);
emit ItemTextFont(b->itemText.at(b->CPos-1)->cfont->SCName);
emit ItemTextFont(b->itemText.at(b->CPos-1)->cfont);
emit ItemTextSize(b->itemText.at(b->CPos-1)->csize);
emit ItemTextUSval(b->itemText.at(b->CPos-1)->cextra);
emit ItemTextStil(b->itemText.at(b->CPos-1)->cstyle);
6550,8 → 6550,8
}
}
yp = static_cast<int>(b->itemText.at(offs)->yp);
desc = static_cast<int>(b->itemText.at(offs)->cfont->numDescender * (-b->itemText.at(offs)->csize / 10.0));
asce = static_cast<int>(b->itemText.at(offs)->cfont->numAscent * (b->itemText.at(offs)->csize / 10.0));
desc = static_cast<int>((*Doc->AllFonts)[b->itemText.at(offs)->cfont]->numDescender * (-b->itemText.at(offs)->csize / 10.0));
asce = static_cast<int>((*Doc->AllFonts)[b->itemText.at(offs)->cfont]->numAscent * (b->itemText.at(offs)->csize / 10.0));
}
else
{
6585,8 → 6585,8
{
xp = static_cast<int>(b->itemText.at(b->CPos)->xp);
yp = static_cast<int>(b->itemText.at(b->CPos)->yp);
desc = static_cast<int>(b->itemText.at(b->CPos)->cfont->numDescender * (-b->itemText.at(b->CPos)->csize / 10.0));
asce = static_cast<int>(b->itemText.at(b->CPos)->cfont->numAscent * (b->itemText.at(b->CPos)->csize / 10.0));
desc = static_cast<int>((*Doc->AllFonts)[b->itemText.at(b->CPos)->cfont]->numDescender * (-b->itemText.at(b->CPos)->csize / 10.0));
asce = static_cast<int>((*Doc->AllFonts)[b->itemText.at(b->CPos)->cfont]->numAscent * (b->itemText.at(b->CPos)->csize / 10.0));
}
}
}
9704,7 → 9704,7
if (b->itemText.count() != 0)
{
for (uint a = 0; a < b->itemText.count(); ++a)
b->itemText.at(a)->cfont = (*Doc->AllFonts)[fon];
b->itemText.at(a)->cfont = fon;
if (b->itemType() == PageItem::PathText)
{
UpdatePolyClip(b);
9722,7 → 9722,7
for (uint a = 0; a < b->itemText.count(); ++a)
{
if (b->itemText.at(a)->cselect)
b->itemText.at(a)->cfont = (*Doc->AllFonts)[fon];
b->itemText.at(a)->cfont = fon;
}
RefreshItem(b);
}
10088,7 → 10088,7
{
if (Doc->docParagraphStyles[s].Font != "")
{
nb->itemText.at(a)->cfont = (*Doc->AllFonts)[Doc->docParagraphStyles[s].Font];
nb->itemText.at(a)->cfont = Doc->docParagraphStyles[s].Font;
nb->itemText.at(a)->csize = Doc->docParagraphStyles[s].FontSize;
nb->itemText.at(a)->cstyle &= ~127;
nb->itemText.at(a)->cstyle |= Doc->docParagraphStyles[s].FontEffect;
10105,7 → 10105,7
nb->itemText.at(a)->cstroke = nb->TxtStroke;
nb->itemText.at(a)->cshade2 = nb->ShTxtStroke;
nb->itemText.at(a)->csize = nb->ISize;
nb->itemText.at(a)->cfont = (*Doc->AllFonts)[nb->IFont];
nb->itemText.at(a)->cfont = nb->IFont;
nb->itemText.at(a)->cstyle &= ~127;
nb->itemText.at(a)->cstyle |= nb->TxTStyle;
}
10132,7 → 10132,7
{
if (Doc->docParagraphStyles[s].Font != "")
{
nb->itemText.at(a)->cfont = (*Doc->AllFonts)[Doc->docParagraphStyles[s].Font];
nb->itemText.at(a)->cfont = Doc->docParagraphStyles[s].Font;
nb->itemText.at(a)->csize = Doc->docParagraphStyles[s].FontSize;
nb->itemText.at(a)->cstyle &= ~127;
nb->itemText.at(a)->cstyle |= Doc->docParagraphStyles[s].FontEffect;
10149,7 → 10149,7
nb->itemText.at(a)->cstroke = nb->TxtStroke;
nb->itemText.at(a)->cshade2 = nb->ShTxtStroke;
nb->itemText.at(a)->csize = nb->ISize;
nb->itemText.at(a)->cfont = (*Doc->AllFonts)[nb->IFont];
nb->itemText.at(a)->cfont = nb->IFont;
nb->itemText.at(a)->cstyle &= ~127;
nb->itemText.at(a)->cstyle |= nb->TxTStyle;
}
10188,7 → 10188,7
{
if (Doc->docParagraphStyles[s].Font != "")
{
b->itemText.at(a)->cfont = (*Doc->AllFonts)[Doc->docParagraphStyles[s].Font];
b->itemText.at(a)->cfont = Doc->docParagraphStyles[s].Font;
b->itemText.at(a)->csize = Doc->docParagraphStyles[s].FontSize;
b->itemText.at(a)->cstyle &= ~127;
b->itemText.at(a)->cstyle |= Doc->docParagraphStyles[s].FontEffect;
10204,7 → 10204,7
b->itemText.at(a)->cshade = b->ShTxtFill;
b->itemText.at(a)->cstroke = b->TxtStroke;
b->itemText.at(a)->cshade2 = b->ShTxtStroke;
b->itemText.at(a)->cfont = (*Doc->AllFonts)[b->IFont];
b->itemText.at(a)->cfont = b->IFont;
b->itemText.at(a)->csize = b->ISize;
b->itemText.at(a)->cstyle &= ~127;
b->itemText.at(a)->cstyle |= b->TxTStyle;
10605,7 → 10605,7
if (hg->ch == QChar(4))
hg->ch = QChar(9);
it++;
hg->cfont = (*Doc->AllFonts)[*it];
hg->cfont = *it;
it++;
hg->csize = qRound((*it).toDouble() * 10);
it++;
11215,11 → 11215,11
uint chr = chx[0].unicode();
QWMatrix chma;
chma.scale(csi, csi);
pts = b->itemText.at(a)->cfont->GlyphArray[chr].Outlines.copy();
pts = (*Doc->AllFonts)[b->itemText.at(a)->cfont]->GlyphArray[chr].Outlines.copy();
if (pts.size() < 4)
continue;
x = b->itemText.at(a)->cfont->GlyphArray[chr].x * csi;
y = b->itemText.at(a)->cfont->GlyphArray[chr].y * csi;
x = (*Doc->AllFonts)[b->itemText.at(a)->cfont]->GlyphArray[chr].x * csi;
y = (*Doc->AllFonts)[b->itemText.at(a)->cfont]->GlyphArray[chr].y * csi;
pts.map(chma);
chma = QWMatrix();
chma.scale(b->itemText.at(a)->cscale / 100.0, 1);
11253,7 → 11253,7
bb->lineColor() = "None";
bb->setLineShade(100);
}
bb->Pwidth = QMAX(b->itemText.at(a)->cfont->strokeWidth * chs / 2.0, 1);
bb->Pwidth = QMAX((*Doc->AllFonts)[b->itemText.at(a)->cfont]->strokeWidth * chs / 2.0, 1);
FPoint tp2 = getMinClipF(&bb->PoLine);
bb->PoLine.translate(-tp2.x(), -tp2.y());
FPoint tp = getMaxClipF(&bb->PoLine);
/branches/Version13x/Scribus/scribus/libpostscript/pslib.cpp
39,7 → 39,7
 
extern void Level2Layer(ScribusDoc *doc, struct Layer *ll, int Level);
extern uint getDouble(QString in, bool raw);
extern double Cwidth(ScribusDoc *doc, Foi* name, QString ch, int Siz, QString ch2 = " ");
extern double Cwidth(ScribusDoc *doc, QString name, QString ch, int Siz, QString ch2 = " ");
extern bool loadText(QString nam, QString *Buffer);
extern QString CompressStr(QString *in);
extern QString ImageToCMYK_PS(QImage *im, int pl, bool pre);
1244,12 → 1244,12
if (hl->cstyle & 2)
tsz = hl->csize * Doc->typographicSetttings.scalingSuperScript / 100;
/* Subset all TTF Fonts until the bug in the TTF-Embedding Code is fixed */
QFileInfo fd = QFileInfo(hl->cfont->Datei);
QFileInfo fd = QFileInfo((*Doc->AllFonts)[hl->cfont]->Datei);
QString fext = fd.extension(false).lower();
if ((fext == "ttf") || (hl->cfont->isOTF) || (hl->cfont->Subset))
if ((fext == "ttf") || ((*Doc->AllFonts)[hl->cfont]->isOTF) || ((*Doc->AllFonts)[hl->cfont]->Subset))
{
uint chr = chx[0].unicode();
if ((hl->cfont->CharWidth.contains(chr)) && (chr != 32))
if (((*Doc->AllFonts)[hl->cfont]->CharWidth.contains(chr)) && (chr != 32))
{
PS_save();
if (ite->Reverse)
1277,7 → 1277,7
{
SetFarbe(Doc, hl->ccolor, hl->cshade, &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_showSub(chr, hl->cfont->RealName().simplifyWhiteSpace().replace( QRegExp("\\s"), "" ), tsz / 10.0, false);
PS_showSub(chr, (*Doc->AllFonts)[hl->cfont]->RealName().simplifyWhiteSpace().replace( QRegExp("\\s"), "" ), tsz / 10.0, false);
}
PS_restore();
}
1284,7 → 1284,7
}
else
{
PS_selectfont(hl->cfont->SCName, tsz / 10.0);
PS_selectfont(hl->cfont, tsz / 10.0);
if (hl->ccolor != "None")
{
SetFarbe(Doc, hl->ccolor, hl->cshade, &h, &s, &v, &k, gcr);
1314,7 → 1314,7
}
if (hl->cscale != 100)
PS_scale(hl->cscale / 100.0, 1);
PS_show_xyG(hl->cfont->SCName, chx, 0, 0);
PS_show_xyG(hl->cfont, chx, 0, 0);
}
else
{
1321,7 → 1321,7
PS_translate(hl->xp, -hl->yp);
if (hl->cscale != 100)
PS_scale(hl->cscale / 100.0, 1);
PS_show_xyG(hl->cfont->SCName, chx, 0, 0);
PS_show_xyG(hl->cfont, chx, 0, 0);
}
PS_restore();
}
1328,9 → 1328,9
if ((hl->cstyle & 4) && (chx != QChar(13)))
{
uint chr = chx[0].unicode();
if (hl->cfont->CharWidth.contains(chr))
if ((*Doc->AllFonts)[hl->cfont]->CharWidth.contains(chr))
{
FPointArray gly = hl->cfont->GlyphArray[chr].Outlines.copy();
FPointArray gly = (*Doc->AllFonts)[hl->cfont]->GlyphArray[chr].Outlines.copy();
QWMatrix chma;
chma.scale(tsz / 100.0, tsz / 100.0);
gly.map(chma);
1347,7 → 1347,7
if (hl->cstroke != "None")
{
PS_save();
PS_setlinewidth(QMAX(hl->cfont->strokeWidth / 2 * (tsz / 10.0), 1));
PS_setlinewidth(QMAX((*Doc->AllFonts)[hl->cfont]->strokeWidth / 2 * (tsz / 10.0), 1));
PS_setcapjoin(Qt::FlatCap, Qt::MiterJoin);
PS_setdash(Qt::SolidLine, 0, dum);
PS_translate(hl->xp, (hl->yp - tsz) * -1);
1363,7 → 1363,7
if ((hl->cstyle & 16) && (chx != QChar(13)))
{
double Ulen = Cwidth(Doc, hl->cfont, chx, hl->csize) * (hl->cscale / 100.0);
double Upos = hl->cfont->strikeout_pos * (tsz / 10.0);
double Upos = (*Doc->AllFonts)[hl->cfont]->strikeout_pos * (tsz / 10.0);
if (hl->ccolor != "None")
{
PS_setcapjoin(Qt::FlatCap, Qt::MiterJoin);
1371,7 → 1371,7
SetFarbe(Doc, hl->ccolor, hl->cshade, &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_setlinewidth(hl->cfont->strokeWidth * (tsz / 10.0));
PS_setlinewidth((*Doc->AllFonts)[hl->cfont]->strokeWidth * (tsz / 10.0));
PS_moveto(hl->xp, -hl->yp+Upos);
PS_lineto(hl->xp+Ulen, -hl->yp+Upos);
PS_stroke();
1379,7 → 1379,7
if ((hl->cstyle & 8) && (chx != QChar(13)))
{
double Ulen = Cwidth(Doc, hl->cfont, chx, hl->csize) * (hl->cscale / 100.0);
double Upos = hl->cfont->underline_pos * (tsz / 10.0);
double Upos = (*Doc->AllFonts)[hl->cfont]->underline_pos * (tsz / 10.0);
if (hl->ccolor != "None")
{
PS_setcapjoin(Qt::FlatCap, Qt::MiterJoin);
1387,7 → 1387,7
SetFarbe(Doc, hl->ccolor, hl->cshade, &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_setlinewidth(hl->cfont->strokeWidth * (tsz / 10.0));
PS_setlinewidth((*Doc->AllFonts)[hl->cfont]->strokeWidth * (tsz / 10.0));
PS_moveto(hl->xp, -hl->yp+Upos);
PS_lineto(hl->xp+Ulen, -hl->yp+Upos);
PS_stroke();
1399,9 → 1399,9
double wide = Cwidth(Doc, hl->cfont, chx, chs);
chx = "-";
uint chr = chx[0].unicode();
if (hl->cfont->CharWidth.contains(chr))
if ((*Doc->AllFonts)[hl->cfont]->CharWidth.contains(chr))
{
FPointArray gly = hl->cfont->GlyphArray[chr].Outlines.copy();
FPointArray gly = (*Doc->AllFonts)[hl->cfont]->GlyphArray[chr].Outlines.copy();
QWMatrix chma;
chma.scale(tsz / 100.0, tsz / 100.0);
gly.map(chma);
1727,12 → 1727,12
if (hl->cstyle & 2)
tsz = hl->csize * Doc->typographicSetttings.scalingSuperScript / 100;
/* Subset all TTF Fonts until the bug in the TTF-Embedding Code is fixed */
QFileInfo fd = QFileInfo(hl->cfont->Datei);
QFileInfo fd = QFileInfo((*Doc->AllFonts)[hl->cfont]->Datei);
QString fext = fd.extension(false).lower();
if ((fext == "ttf") || (hl->cfont->isOTF) || (hl->cfont->Subset))
if ((fext == "ttf") || ((*Doc->AllFonts)[hl->cfont]->isOTF) || ((*Doc->AllFonts)[hl->cfont]->Subset))
{
uint chr = chx[0].unicode();
if ((hl->cfont->CharWidth.contains(chr)) && (chr != 32))
if (((*Doc->AllFonts)[hl->cfont]->CharWidth.contains(chr)) && (chr != 32))
{
PS_save();
if (c->Reverse)
1760,7 → 1760,7
{
SetFarbe(Doc, hl->ccolor, hl->cshade, &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
PS_showSub(chr, hl->cfont->RealName().simplifyWhiteSpace().replace( QRegExp("\\s"), "" ), tsz / 10.0, false);
PS_showSub(chr, (*Doc->AllFonts)[hl->cfont]->RealName().simplifyWhiteSpace().replace( QRegExp("\\s"), "" ), tsz / 10.0, false);
}
PS_restore();
}
1767,7 → 1767,7
}
else
{
PS_selectfont(hl->cfont->SCName, tsz / 10.0);
PS_selectfont(hl->cfont, tsz / 10.0);
if (hl->ccolor != "None")
{
SetFarbe(Doc, hl->ccolor, hl->cshade, &h, &s, &v, &k, gcr);
1797,7 → 1797,7
}
if (hl->cscale != 100)
PS_scale(hl->cscale / 100.0, 1);
PS_show_xyG(hl->cfont->SCName, chx, 0, 0);
PS_show_xyG(hl->cfont, chx, 0, 0);
}
else
{
1804,7 → 1804,7
PS_translate(hl->xp, -hl->yp);
if (hl->cscale != 100)
PS_scale(hl->cscale / 100.0, 1);
PS_show_xyG(hl->cfont->SCName, chx, 0, 0);
PS_show_xyG(hl->cfont, chx, 0, 0);
}
PS_restore();
}
1811,9 → 1811,9
if ((hl->cstyle & 4) && (chx != QChar(13)))
{
uint chr = chx[0].unicode();
if (hl->cfont->CharWidth.contains(chr))
if ((*Doc->AllFonts)[hl->cfont]->CharWidth.contains(chr))
{
FPointArray gly = hl->cfont->GlyphArray[chr].Outlines.copy();
FPointArray gly = (*Doc->AllFonts)[hl->cfont]->GlyphArray[chr].Outlines.copy();
QWMatrix chma;
chma.scale(tsz / 100.0, tsz / 100.0);
gly.map(chma);
1830,7 → 1830,7
if (hl->cstroke != "None")
{
PS_save();
PS_setlinewidth(QMAX(hl->cfont->strokeWidth / 2 * (tsz / 10.0), 1));
PS_setlinewidth(QMAX((*Doc->AllFonts)[hl->cfont]->strokeWidth / 2 * (tsz / 10.0), 1));
PS_setcapjoin(Qt::FlatCap, Qt::MiterJoin);
PS_setdash(Qt::SolidLine, 0, dum);
PS_translate(hl->xp, (hl->yp - (tsz / 10.0)) * -1);
1846,7 → 1846,7
if ((hl->cstyle & 16) && (chx != QChar(13)))
{
double Ulen = Cwidth(Doc, hl->cfont, chx, hl->csize) * (hl->cscale / 100.0);
double Upos = hl->cfont->strikeout_pos * (tsz / 10.0);
double Upos = (*Doc->AllFonts)[hl->cfont]->strikeout_pos * (tsz / 10.0);
if (hl->ccolor != "None")
{
PS_setcapjoin(Qt::FlatCap, Qt::MiterJoin);
1854,7 → 1854,7
SetFarbe(Doc, hl->ccolor, hl->cshade, &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_setlinewidth(hl->cfont->strokeWidth * (tsz / 10.0));
PS_setlinewidth((*Doc->AllFonts)[hl->cfont]->strokeWidth * (tsz / 10.0));
PS_moveto(hl->xp, -hl->yp+Upos);
PS_lineto(hl->xp+Ulen, -hl->yp+Upos);
PS_stroke();
1862,7 → 1862,7
if ((hl->cstyle & 8) && (chx != QChar(13)))
{
double Ulen = Cwidth(Doc, hl->cfont, chx, hl->csize) * (hl->cscale / 100.0);
double Upos = hl->cfont->underline_pos * (tsz / 10.0);
double Upos = (*Doc->AllFonts)[hl->cfont]->underline_pos * (tsz / 10.0);
if (hl->ccolor != "None")
{
PS_setcapjoin(Qt::FlatCap, Qt::MiterJoin);
1870,7 → 1870,7
SetFarbe(Doc, hl->ccolor, hl->cshade, &h, &s, &v, &k, gcr);
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_setlinewidth(hl->cfont->strokeWidth * (tsz / 10.0));
PS_setlinewidth((*Doc->AllFonts)[hl->cfont]->strokeWidth * (tsz / 10.0));
PS_moveto(hl->xp, -hl->yp+Upos);
PS_lineto(hl->xp+Ulen, -hl->yp+Upos);
PS_stroke();
1882,9 → 1882,9
double wide = Cwidth(Doc, hl->cfont, chx, chs);
chx = "-";
uint chr = chx[0].unicode();
if (hl->cfont->CharWidth.contains(chr))
if ((*Doc->AllFonts)[hl->cfont]->CharWidth.contains(chr))
{
FPointArray gly = hl->cfont->GlyphArray[chr].Outlines.copy();
FPointArray gly = (*Doc->AllFonts)[hl->cfont]->GlyphArray[chr].Outlines.copy();
QWMatrix chma;
chma.scale(tsz / 100.0, tsz / 100.0);
gly.map(chma);
2167,12 → 2167,12
PS_setcmykcolor_stroke(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
/* Subset all TTF Fonts until the bug in the TTF-Embedding Code is fixed */
QFileInfo fd = QFileInfo(hl->cfont->Datei);
QFileInfo fd = QFileInfo((*Doc->AllFonts)[hl->cfont]->Datei);
QString fext = fd.extension(false).lower();
if ((fext == "ttf") || (hl->cfont->isOTF) || (hl->cfont->Subset))
if ((fext == "ttf") || ((*Doc->AllFonts)[hl->cfont]->isOTF) || ((*Doc->AllFonts)[hl->cfont]->Subset))
{
uint chr = chx[0].unicode();
if ((hl->cfont->CharWidth.contains(chr)) && (chr != 32))
if (((*Doc->AllFonts)[hl->cfont]->CharWidth.contains(chr)) && (chr != 32))
{
PS_save();
/* PS_translate(hl->PtransX, -hl->PtransY);
2208,7 → 2208,7
PS_translate(0, (tsz / 10.0));
if (c->BaseOffs != 0)
PS_translate(0, -c->BaseOffs);
PS_showSub(chr, hl->cfont->RealName().simplifyWhiteSpace().replace( QRegExp("\\s"), "" ), tsz / 10.0, false);
PS_showSub(chr, (*Doc->AllFonts)[hl->cfont]->RealName().simplifyWhiteSpace().replace( QRegExp("\\s"), "" ), tsz / 10.0, false);
}
PS_restore();
}
2215,7 → 2215,7
}
else
{
PS_selectfont(hl->cfont->SCName, tsz / 10.0);
PS_selectfont(hl->cfont, tsz / 10.0);
PS_save();
PutSeite("["+ToStr(1) + " " + ToStr(0) + " " + ToStr(0) + " " + ToStr(-1) + " " + ToStr(-hl->PRot) + " " + ToStr(0) + "]\n");
PutSeite("["+ToStr(hl->PtransX) + " " + ToStr(-hl->PtransY) + " " + ToStr(-hl->PtransY) + " " + ToStr(-hl->PtransX) + " " + ToStr(hl->xp) + " " + ToStr(-hl->yp) + "]\n");
2222,7 → 2222,7
PutSeite("["+ToStr(0) + " " + ToStr(0) + " " + ToStr(0) + " " + ToStr(0) + " " + ToStr(0) + " " + ToStr(0) + "] concatmatrix\nconcat\n");
if (c->BaseOffs != 0)
PS_translate(0, -c->BaseOffs);
PS_show_xyG(hl->cfont->SCName, chx, 0, 0);
PS_show_xyG(hl->cfont, chx, 0, 0);
PS_restore();
}
}
/branches/Version13x/Scribus/scribus/scribus.cpp
1739,7 → 1739,7
doc->currentParaStyle = b->itemText.at(ChPos)->cab;
setAbsValue(doc->currentParaStyle);
propertiesPalette->setAli(doc->currentParaStyle);
doc->CurrFont = b->itemText.at(ChPos)->cfont->SCName;
doc->CurrFont = b->itemText.at(ChPos)->cfont;
doc->CurrFontSize = b->itemText.at(ChPos)->csize;
doc->CurrTextFill = b->itemText.at(ChPos)->ccolor;
doc->CurrTextFillSh = b->itemText.at(ChPos)->cshade;
1798,7 → 1798,7
if (actionName=="specialNonBreakingSpace")
hg->ch = QString(QChar(29));
 
hg->cfont = (*doc->AllFonts)[doc->CurrFont];
hg->cfont = doc->CurrFont;
hg->csize = doc->CurrFontSize;
hg->ccolor = doc->CurrTextFill;
hg->cshade = doc->CurrTextFillSh;
1810,7 → 1810,7
hg->cab = doc->currentParaStyle;
if (doc->docParagraphStyles[doc->currentParaStyle].Font != "")
{
hg->cfont = (*doc->AllFonts)[doc->docParagraphStyles[doc->currentParaStyle].Font];
hg->cfont = doc->docParagraphStyles[doc->currentParaStyle].Font;
hg->csize = doc->docParagraphStyles[doc->currentParaStyle].FontSize;
}
hg->cextra = 0;
2224,7 → 2224,7
conv = 32;
hg = new ScText;
hg->ch = QString(QChar(conv));
hg->cfont = (*doc->AllFonts)[doc->CurrFont];
hg->cfont = doc->CurrFont;
hg->csize = doc->CurrFontSize;
hg->ccolor = doc->CurrTextFill;
hg->cshade = doc->CurrTextFillSh;
2236,7 → 2236,7
hg->cab = doc->currentParaStyle;
if (doc->docParagraphStyles[doc->currentParaStyle].Font != "")
{
hg->cfont = (*doc->AllFonts)[doc->docParagraphStyles[doc->currentParaStyle].Font];
hg->cfont = doc->docParagraphStyles[doc->currentParaStyle].Font;
hg->csize = doc->docParagraphStyles[doc->currentParaStyle].FontSize;
}
hg->cextra = 0;
2648,7 → 2648,7
hg->ch = QString(QChar(28));
else if (kk == Key_Tab)
hg->ch = QString(QChar(9));
hg->cfont = (*doc->AllFonts)[doc->CurrFont];
hg->cfont = doc->CurrFont;
hg->csize = doc->CurrFontSize;
hg->ccolor = doc->CurrTextFill;
hg->cshade = doc->CurrTextFillSh;
2660,7 → 2660,7
hg->cab = doc->currentParaStyle;
if (doc->docParagraphStyles[doc->currentParaStyle].Font != "")
{
hg->cfont = (*doc->AllFonts)[doc->docParagraphStyles[doc->currentParaStyle].Font];
hg->cfont = doc->docParagraphStyles[doc->currentParaStyle].Font;
hg->csize = doc->docParagraphStyles[doc->currentParaStyle].FontSize;
}
hg->cextra = 0;
2679,7 → 2679,7
{
hg = new ScText;
hg->ch = uc;
hg->cfont = (*doc->AllFonts)[doc->CurrFont];
hg->cfont = doc->CurrFont;
hg->ccolor = doc->CurrTextFill;
hg->cshade = doc->CurrTextFillSh;
hg->cstroke = doc->CurrTextStroke;
2692,7 → 2692,7
hg->cab = doc->currentParaStyle;
if (doc->docParagraphStyles[doc->currentParaStyle].Font != "")
{
hg->cfont = (*doc->AllFonts)[doc->docParagraphStyles[doc->currentParaStyle].Font];
hg->cfont = doc->docParagraphStyles[doc->currentParaStyle].Font;
hg->csize = doc->docParagraphStyles[doc->currentParaStyle].FontSize;
}
hg->xp = 0;
5436,7 → 5436,7
BufferI += nb->itemText.at(a)->ch;
}
Buffer2 += "\t";
Buffer2 += nb->itemText.at(a)->cfont->SCName+"\t";
Buffer2 += nb->itemText.at(a)->cfont+"\t";
Buffer2 += QString::number(nb->itemText.at(a)->csize)+"\t";
Buffer2 += nb->itemText.at(a)->ccolor+"\t";
Buffer2 += QString::number(nb->itemText.at(a)->cextra)+"\t";
5513,7 → 5513,7
BufferI += nb->itemText.at(a)->ch;
}
Buffer2 += "\t";
Buffer2 += nb->itemText.at(a)->cfont->SCName+"\t";
Buffer2 += nb->itemText.at(a)->cfont+"\t";
Buffer2 += QString::number(nb->itemText.at(a)->csize)+"\t";
Buffer2 += nb->itemText.at(a)->ccolor+"\t";
Buffer2 += QString::number(nb->itemText.at(a)->cextra)+"\t";
5575,7 → 5575,7
if (hg->ch == QChar(4))
hg->ch = QChar(9);
it++;
hg->cfont = (*doc->AllFonts)[*it];
hg->cfont = *it;
it++;
hg->csize = (*it).toInt();
it++;
7157,8 → 7157,8
{
if (cabneu > 0)
{
if (ite->itemText.at(e)->cfont == (*doc->AllFonts)[doc->docParagraphStyles[cabori].Font])
ite->itemText.at(e)->cfont = (*doc->AllFonts)[dia->TempVorl[cabneu].Font];
if (ite->itemText.at(e)->cfont == doc->docParagraphStyles[cabori].Font)
ite->itemText.at(e)->cfont = dia->TempVorl[cabneu].Font;
if (ite->itemText.at(e)->csize == doc->docParagraphStyles[cabori].FontSize)
ite->itemText.at(e)->csize = dia->TempVorl[cabneu].FontSize;
if ((ite->itemText.at(e)->cstyle & 127 ) == doc->docParagraphStyles[cabori].FontEffect)
7203,8 → 7203,8
{
if (cabneu > 0)
{
if (ite->itemText.at(e)->cfont == (*doc->AllFonts)[doc->docParagraphStyles[cabori].Font])
ite->itemText.at(e)->cfont = (*doc->AllFonts)[dia->TempVorl[cabneu].Font];
if (ite->itemText.at(e)->cfont == doc->docParagraphStyles[cabori].Font)
ite->itemText.at(e)->cfont = dia->TempVorl[cabneu].Font;
if (ite->itemText.at(e)->csize == doc->docParagraphStyles[cabori].FontSize)
ite->itemText.at(e)->csize = dia->TempVorl[cabneu].FontSize;
if ((ite->itemText.at(e)->cstyle & 127 ) == doc->docParagraphStyles[cabori].FontEffect)
10029,7 → 10029,7
{
for (uint e = 0; e < it->itemText.count(); ++e)
{
Really.insert(it->itemText.at(e)->cfont->SCName, doc->UsedFonts[it->itemText.at(e)->cfont->SCName]);
Really.insert(it->itemText.at(e)->cfont, doc->UsedFonts[it->itemText.at(e)->cfont]);
}
}
}
10041,7 → 10041,7
{
for (uint e = 0; e < it->itemText.count(); ++e)
{
Really.insert(it->itemText.at(e)->cfont->SCName, doc->UsedFonts[it->itemText.at(e)->cfont->SCName]);
Really.insert(it->itemText.at(e)->cfont, doc->UsedFonts[it->itemText.at(e)->cfont]);
}
}
}
10074,7 → 10074,7
{
for (uint e = 0; e < it->itemText.count(); ++e)
{
Really->insert(it->itemText.at(e)->cfont->SCName, doc->UsedFonts[it->itemText.at(e)->cfont->SCName]);
Really->insert(it->itemText.at(e)->cfont, doc->UsedFonts[it->itemText.at(e)->cfont]);
uint chr = it->itemText.at(e)->ch[0].unicode();
if ((chr == 13) || (chr == 32) || (chr == 29) || (chr == 9))
continue;
10089,18 → 10089,18
{
for (uint numco = 0x30; numco < 0x3A; ++numco)
{
if (it->itemText.at(e)->cfont->CharWidth.contains(numco))
if ((*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(numco))
{
gly = it->itemText.at(e)->cfont->GlyphArray[numco].Outlines.copy();
it->itemText.at(e)->cfont->RealGlyphs.insert(numco, gly);
gly = (*doc->AllFonts)[it->itemText.at(e)->cfont]->GlyphArray[numco].Outlines.copy();
(*doc->AllFonts)[it->itemText.at(e)->cfont]->RealGlyphs.insert(numco, gly);
}
}
continue;
}
if (it->itemText.at(e)->cfont->CharWidth.contains(chr))
if ((*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(chr))
{
gly = it->itemText.at(e)->cfont->GlyphArray[chr].Outlines.copy();
it->itemText.at(e)->cfont->RealGlyphs.insert(chr, gly);
gly = (*doc->AllFonts)[it->itemText.at(e)->cfont]->GlyphArray[chr].Outlines.copy();
(*doc->AllFonts)[it->itemText.at(e)->cfont]->RealGlyphs.insert(chr, gly);
}
}
}
10112,7 → 10112,7
{
for (uint e = 0; e < it->itemText.count(); ++e)
{
Really->insert(it->itemText.at(e)->cfont->SCName, doc->UsedFonts[it->itemText.at(e)->cfont->SCName]);
Really->insert(it->itemText.at(e)->cfont, doc->UsedFonts[it->itemText.at(e)->cfont]);
uint chr = it->itemText.at(e)->ch[0].unicode();
if ((chr == 13) || (chr == 32) || (chr == 29) || (chr == 9))
continue;
10127,18 → 10127,18
{
for (uint numco = 0x30; numco < 0x3A; ++numco)
{
if (it->itemText.at(e)->cfont->CharWidth.contains(numco))
if ((*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(numco))
{
gly = it->itemText.at(e)->cfont->GlyphArray[numco].Outlines.copy();
it->itemText.at(e)->cfont->RealGlyphs.insert(numco, gly);
gly = (*doc->AllFonts)[it->itemText.at(e)->cfont]->GlyphArray[numco].Outlines.copy();
(*doc->AllFonts)[it->itemText.at(e)->cfont]->RealGlyphs.insert(numco, gly);
}
}
continue;
}
if (it->itemText.at(e)->cfont->CharWidth.contains(chr))
if ((*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(chr))
{
gly = it->itemText.at(e)->cfont->GlyphArray[chr].Outlines.copy();
it->itemText.at(e)->cfont->RealGlyphs.insert(chr, gly);
gly = (*doc->AllFonts)[it->itemText.at(e)->cfont]->GlyphArray[chr].Outlines.copy();
(*doc->AllFonts)[it->itemText.at(e)->cfont]->RealGlyphs.insert(chr, gly);
}
}
}
10215,12 → 10215,12
{
for (uint numco = 0x30; numco < 0x3A; ++numco)
{
if ((!it->itemText.at(e)->cfont->CharWidth.contains(numco)) && (checkerSettings.checkGlyphs))
if ((!(*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(numco)) && (checkerSettings.checkGlyphs))
itemError.insert(1, 0);
}
continue;
}
if ((!it->itemText.at(e)->cfont->CharWidth.contains(chr)) && (checkerSettings.checkGlyphs))
if ((!(*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(chr)) && (checkerSettings.checkGlyphs))
itemError.insert(1, 0);
}
}
10272,12 → 10272,12
{
for (uint numco = 0x30; numco < 0x3A; ++numco)
{
if ((!it->itemText.at(e)->cfont->CharWidth.contains(numco)) && (checkerSettings.checkGlyphs))
if ((!(*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(numco)) && (checkerSettings.checkGlyphs))
itemError.insert(1, 0);
}
continue;
}
if ((!it->itemText.at(e)->cfont->CharWidth.contains(chr)) && (checkerSettings.checkGlyphs))
if ((!(*doc->AllFonts)[it->itemText.at(e)->cfont]->CharWidth.contains(chr)) && (checkerSettings.checkGlyphs))
itemError.insert(1, 0);
}
}
/branches/Version13x/Scribus/scribus/annota.cpp
6,7 → 6,6
* (at your option) any later version. *
* *
***************************************************************************/
#include "scfonts.h"
#include "annota.h"
#include "annota.moc"
#include "customfdialog.h"
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
46,7 → 46,7
{
for (uint b = 0; b < it->itemText.count(); b++)
if (it->itemText.at(b)->cselect)
return PyString_FromString(it->itemText.at(b)->cfont->SCName.utf8());
return PyString_FromString(it->itemText.at(b)->cfont.utf8());
return NULL;
}
else
268,7 → 268,7
hg->ch = Daten.at(a);
if (hg->ch == QChar(10))
hg->ch = QChar(13);
hg->cfont = (*Carrier->doc->AllFonts)[it->IFont];
hg->cfont = it->IFont;
hg->csize = it->ISize;
hg->ccolor = it->TxtFill;
hg->cshade = it->ShTxtFill;
320,7 → 320,7
hg->ch = Daten.at(Daten.length()-1-a);
if (hg->ch == QChar(10))
hg->ch = QChar(13);
hg->cfont = (*Carrier->doc->AllFonts)[it->IFont];
hg->cfont = it->IFont;
hg->csize = it->ISize;
hg->ccolor = it->TxtFill;
hg->cshade = it->ShTxtFill;
/branches/Version13x/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp
29,7 → 29,7
extern QPointArray FlattenPath(FPointArray ina, QValueList<uint> &Segs);
extern bool loadText(QString nam, QString *Buffer);
extern QPixmap loadIcon(QString nam);
extern double RealCWidth(ScribusDoc *doc, Foi* name, QString ch, int Siz);
extern double RealCWidth(ScribusDoc *doc, QString name, QString ch, int Siz);
extern FPoint getMaxClipF(FPointArray* Clip);
extern FPoint getMinClipF(FPointArray* Clip);
extern PrefsFile* prefsFile;
1956,7 → 1956,7
{
hg = new ScText;
hg->ch = Text.at(tt);
hg->cfont = (*Doku->AllFonts)[gc->Family];
hg->cfont = gc->Family;
hg->csize = gc->FontSize;
hg->ccolor = gc->FillCol;
hg->cextra = 0;
2037,7 → 2037,7
{
hg = new ScText;
hg->ch = Text.at(cc);
hg->cfont = (*Doku->AllFonts)[gc->Family];
hg->cfont = gc->Family;
hg->csize = gc->FontSize;
hg->ccolor = gc->FillCol;
hg->cextra = 0;
/branches/Version13x/Scribus/scribus/plugins/fileloader/oodraw/oodrawimp.cpp
39,6 → 39,7
extern QPointArray FlattenPath(FPointArray ina, QValueList<uint> &Segs);
extern bool loadText(QString nam, QString *Buffer);
extern QPixmap loadIcon(QString nam);
extern double RealCWidth(ScribusDoc *doc, QString name, QString ch, int Siz);
extern FPoint getMaxClipF(FPointArray* Clip);
extern PrefsFile* prefsFile;
 
/branches/Version13x/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
708,12 → 708,12
if ((hl->cstroke != "None") && (chst & 4))
{
tp->setAttribute("stroke", SetFarbe(hl->cstroke, hl->cshade2, plug));
tp->setAttribute("stroke-width", FToStr((*plug->doc->AllFonts)[hl->cfont->SCName]->strokeWidth * (hl->csize / 10.0))+"pt");
tp->setAttribute("stroke-width", FToStr((*plug->doc->AllFonts)[hl->cfont]->strokeWidth * (hl->csize / 10.0))+"pt");
}
else
tp->setAttribute("stroke", "none");
tp->setAttribute("font-size", (hl->csize / 10.0));
tp->setAttribute("font-family", (*plug->doc->AllFonts)[hl->cfont->SCName]->Family);
tp->setAttribute("font-family", (*plug->doc->AllFonts)[hl->cfont]->Family);
if (chst != 0)
{
if (chst & 64)
/branches/Version13x/Scribus/scribus/libpdf/pdflib.cpp
66,7 → 66,7
extern QString MaskToTxt14(QImage *im);
extern char *toHex( uchar u );
extern QString String2Hex(QString *in, bool lang = true);
extern double Cwidth(ScribusDoc *doc, Foi* name, QString ch, int Siz, QString ch2 = " ");
extern double Cwidth(ScribusDoc *doc, QString name, QString ch, int Siz, QString ch2 = " ");
extern FPoint getMaxClipF(FPointArray* Clip);
extern FPoint getMinClipF(FPointArray* Clip);
#ifdef HAVE_CMS
557,7 → 557,7
{
for (uint e = 0; e < pgit->itemText.count(); ++e)
{
ReallyUsed.insert(pgit->itemText.at(e)->cfont->SCName, DocFonts[pgit->itemText.at(e)->cfont->SCName]);
ReallyUsed.insert(pgit->itemText.at(e)->cfont, DocFonts[pgit->itemText.at(e)->cfont]);
}
}
}
568,7 → 568,7
{
for (uint e = 0; e < pgit->itemText.count(); ++e)
{
ReallyUsed.insert(pgit->itemText.at(e)->cfont->SCName, DocFonts[pgit->itemText.at(e)->cfont->SCName]);
ReallyUsed.insert(pgit->itemText.at(e)->cfont, DocFonts[pgit->itemText.at(e)->cfont]);
}
}
}
2635,8 → 2635,8
}
uint cc = chx[0].unicode();
uint idx = 0;
if (GlyphsIdxOfFont[hl->cfont->SCName].contains(cc))
idx = GlyphsIdxOfFont[hl->cfont->SCName][cc].Code;
if (GlyphsIdxOfFont[hl->cfont].contains(cc))
idx = GlyphsIdxOfFont[hl->cfont][cc].Code;
uint idx1 = (idx >> 8) & 0xFF;
if (hl->cstyle & 64)
{
2660,14 → 2660,14
FillColor = "";
FillColor += putColor(hl->ccolor, hl->cshade, true);
}
if ((hl->cfont->isOTF) || (hl->cfont->Subset) || (Options->SubsetList.contains(hl->cfont->SCName)))
if (((*doc->AllFonts)[hl->cfont]->isOTF) || ((*doc->AllFonts)[hl->cfont]->Subset) || (Options->SubsetList.contains(hl->cfont)))
{
uint chr = chx[0].unicode();
if ((hl->cfont->CharWidth.contains(chr)) && (chr != 32))
if (((*doc->AllFonts)[hl->cfont]->CharWidth.contains(chr)) && (chr != 32))
{
if ((hl->cstroke != "None") && (hl->cstyle & 4))
{
tmp2 += FToStr(QMAX(hl->cfont->strokeWidth * tsz / 20.0, 10) / tsz)+" w\n[] 0 d\n0 J\n0 j\n";
tmp2 += FToStr(QMAX((*doc->AllFonts)[hl->cfont]->strokeWidth * tsz / 20.0, 10) / tsz)+" w\n[] 0 d\n0 J\n0 j\n";
tmp2 += StrokeColor;
}
if (hl->ccolor != "None")
2699,10 → 2699,10
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 += "/"+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 = hl->cfont->GlyphArray[chr].Outlines.copy();
FPointArray gly = (*doc->AllFonts)[hl->cfont]->GlyphArray[chr].Outlines.copy();
QWMatrix mat;
mat.scale(0.1, 0.1);
gly.map(mat);
2741,7 → 2741,7
tmp2 += "1 0 0 1 "+FToStr(wtr / (tsz / 10.0))+" 0 cm\n";
chx = "-";
chr = chx[0].unicode();
FPointArray gly = hl->cfont->GlyphArray[chr].Outlines.copy();
FPointArray gly = (*doc->AllFonts)[hl->cfont]->GlyphArray[chr].Outlines.copy();
QWMatrix mat;
mat.scale(0.1, 0.1);
gly.map(mat);
2780,10 → 2780,10
{
cc = chx[0].unicode();
idx = 0;
if (GlyphsIdxOfFont[hl->cfont->SCName].contains(cc))
idx = GlyphsIdxOfFont[hl->cfont->SCName][cc].Code;
if (GlyphsIdxOfFont[hl->cfont].contains(cc))
idx = GlyphsIdxOfFont[hl->cfont][cc].Code;
idx1 = (idx >> 8) & 0xFF;
tmp += UsedFontsP[hl->cfont->SCName]+"S"+IToStr(idx1)+" "+FToStr(tsz / 10.0)+" Tf\n";
tmp += UsedFontsP[hl->cfont]+"S"+IToStr(idx1)+" "+FToStr(tsz / 10.0)+" Tf\n";
if (hl->cstroke != "None")
{
tmp += StrokeColor;
2797,7 → 2797,7
tmp2 += FillColor;
}
if (hl->cstyle & 4)
tmp += FToStr(hl->cfont->strokeWidth * tsz / 20.0) + (hl->ccolor != "None" ? " w 2 Tr\n" : " w 1 Tr\n");
tmp += FToStr((*doc->AllFonts)[hl->cfont]->strokeWidth * tsz / 20.0) + (hl->ccolor != "None" ? " w 2 Tr\n" : " w 1 Tr\n");
else
tmp += "0 Tr\n";
if (ite->itemType() != PageItem::PathText)
2837,10 → 2837,10
chx = "-";
cc = chx[0].unicode();
idx = 0;
if (GlyphsIdxOfFont[hl->cfont->SCName].contains(cc))
idx = GlyphsIdxOfFont[hl->cfont->SCName][cc].Code;
if (GlyphsIdxOfFont[hl->cfont].contains(cc))
idx = GlyphsIdxOfFont[hl->cfont][cc].Code;
idx1 = (idx >> 8) & 0xFF;
tmp += UsedFontsP[hl->cfont->SCName]+"S"+IToStr(idx1)+" "+FToStr(tsz / 10.0)+" Tf\n";
tmp += UsedFontsP[hl->cfont]+"S"+IToStr(idx1)+" "+FToStr(tsz / 10.0)+" Tf\n";
idx2 = idx & 0xFF;
tmp += "<"+QString(toHex(idx2))+"> Tj\n";
}
2848,8 → 2848,8
if ((hl->cstyle & 8) && (chx != QChar(13)))
{
double Ulen = Cwidth(doc, hl->cfont, chx, hl->csize) * (hl->cscale / 100.0);
double Upos = hl->cfont->underline_pos * (tsz / 10.0);
double Uwid = QMAX(hl->cfont->strokeWidth * (tsz / 10.0), 1);
double Upos = (*doc->AllFonts)[hl->cfont]->underline_pos * (tsz / 10.0);
double Uwid = QMAX((*doc->AllFonts)[hl->cfont]->strokeWidth * (tsz / 10.0), 1);
if (hl->ccolor != "None")
tmp2 += putColor(hl->cstroke, hl->cshade, false);
tmp2 += FToStr(Uwid)+" w\n";
2860,8 → 2860,8
if ((hl->cstyle & 16) && (chx != QChar(13)))
{
double Ulen = Cwidth(doc, hl->cfont, chx, hl->csize) * (hl->cscale / 100.0);
double Upos = hl->cfont->strikeout_pos * (tsz / 10.0);
double Uwid = QMAX(hl->cfont->strokeWidth * (tsz / 10.0), 1);
double Upos = (*doc->AllFonts)[hl->cfont]->strikeout_pos * (tsz / 10.0);
double Uwid = QMAX((*doc->AllFonts)[hl->cfont]->strokeWidth * (tsz / 10.0), 1);
if (hl->ccolor != "None")
tmp2 += putColor(hl->cstroke, hl->cshade, false);
tmp2 += FToStr(Uwid)+" w\n";
/branches/Version13x/Scribus/scribus/selfield.cpp
1,5 → 1,3
 
#include "scfonts.h"
#include "selfield.h"
#include "selfield.moc"
#include <qstringlist.h>
/branches/Version13x/Scribus/scribus/scpreview.cpp
354,7 → 354,7
if (hg->ch == QChar(5))
hg->ch = QChar(13);
it++;
hg->cfont = Prefs->AvailFonts[*it];
hg->cfont = *it;
it++;
hg->csize = qRound((*it).toDouble() * 10.0);
it++;
598,7 → 598,7
pS->setPen(tmpfa, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
mode += 1;
}
DrawZeichenS(pS, hl->xp, hl->yp, chx, hl->cfont->SCName, OB.Reverse, hl->cstyle, mode, chs);
DrawZeichenS(pS, hl->xp, hl->yp, chx, hl->cfont, OB.Reverse, hl->cstyle, mode, chs);
}
pS->restore();
}
756,7 → 756,7
pS->setPen(tmpfa);
}
chs = hl->csize;
asce = Prefs->AvailFonts[hl->cfont->SCName]->numAscent * (hl->csize / 10.0);
asce = Prefs->AvailFonts[hl->cfont]->numAscent * (hl->csize / 10.0);
int chst = hl->cstyle & 127;
if (chst != 0)
{
779,7 → 779,7
}
}
}
wide = Prefs->AvailFonts[hl->cfont->SCName]->CharWidth[chx[0].unicode()]*(chs / 10.0);
wide = Prefs->AvailFonts[hl->cfont]->CharWidth[chx[0].unicode()]*(chs / 10.0);
if ((CurX+(wide+hl->cextra)/2) >= wid)
{
if (zae < cl.size()-1)
809,7 → 809,7
pS->save();
pS->translate(cl.point(zae).x(), cl.point(zae).y());
pS->rotate(rota);
DrawZeichenS(pS, CurX+hl->cextra, CurY+OB.BaseOffs, chx, hl->cfont->SCName, OB.Reverse, hl->cstyle, 2, chs);
DrawZeichenS(pS, CurX+hl->cextra, CurY+OB.BaseOffs, chx, hl->cfont, OB.Reverse, hl->cstyle, 2, chs);
pS->restore();
CurX += wide+hl->cextra;
}