Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 1576 → Rev 1577

/branches/Version13x/Scribus/scribus/gtfont.cpp
204,6 → 204,12
setSlant(NO_SLANT);
setWidth(NO_WIDTH);
}
if (weightIndex < 0)
{
weightIndex = 0;
slantIndex = 1;
widthIndex = 2;
}
}
 
void gtFont::setWeight(QString newWeight)
210,12 → 216,18
{
weight = newWeight;
useFullName = false;
if ((newWeight == fontWeights[ROMAN]) ||
(newWeight == fontWeights[REGULAR]))
if ((newWeight == fontWeights[ROMAN]) ||
(newWeight == fontWeights[REGULAR]))
{
setSlant(NO_SLANT);
setWidth(NO_WIDTH);
}
if (weightIndex < 0)
{
weightIndex = 0;
slantIndex = 1;
widthIndex = 2;
}
}
 
QString gtFont::getWeight()
234,6 → 246,12
else if (weight == fontWeights[ROMAN])
setWeight(NO_WEIGHT);
}
if (slantIndex < 0)
{
weightIndex = 0;
slantIndex = 1;
widthIndex = 2;
}
}
 
void gtFont::setSlant(QString newSlant)
247,6 → 265,12
else if (weight == fontWeights[ROMAN])
setWeight(NO_WEIGHT);
}
if (slantIndex < 0)
{
weightIndex = 0;
slantIndex = 1;
widthIndex = 2;
}
}
 
QString gtFont::getSlant()
265,6 → 289,12
else if (weight == fontWeights[ROMAN])
setWeight(NO_WEIGHT);
}
if (widthIndex < 0)
{
weightIndex = 0;
slantIndex = 1;
widthIndex = 2;
}
}
 
void gtFont::setWidth(QString newWidth)
278,6 → 308,12
else if (weight == fontWeights[ROMAN])
setWeight(NO_WEIGHT);
}
if (widthIndex < 0)
{
weightIndex = 0;
slantIndex = 1;
widthIndex = 2;
}
}
 
QString gtFont::getWidth()
322,6 → 358,7
return name;
 
QString name2 = family + " ";
 
if (weightIndex == 0)
name2 += weight + " ";
else if (slantIndex == 0)
328,6 → 365,7
name2 += slant + " ";
else if (widthIndex == 0)
name2 += width + " ";
 
if (weightIndex == 1)
name2 += weight + " ";
else if (slantIndex == 1)
334,6 → 372,7
name2 += slant + " ";
else if (widthIndex == 1)
name2 += width + " ";
 
if (weightIndex == 2)
name2 += weight + " ";
else if (slantIndex == 2)
340,6 → 379,7
name2 += slant + " ";
else if (widthIndex == 2)
name2 += width + " ";
 
name2 += append;
name2 = name2.simplifyWhiteSpace();
return name2;