Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 19359 → Rev 19360

/trunk/Scribus/scribus/fonts/ftface.h
74,7 → 74,7
QString pdfDescentAsString() const { return m_pdfDescender; }
QString pdfCapHeightAsString() const { return m_pdfCapHeight; }
QString pdfFontBBoxAsString() const { return m_pdfFontBBox; }
QString ItalicAngleAsString() const { return m_italicAngle; }
QString italicAngleAsString() const { return m_italicAngle; }
 
 
//FIXME QMap<QString,QString> fontDictionary(qreal sz=1.0) const;
/trunk/Scribus/scribus/fonts/scface.cpp
201,6 → 201,14
return NONE;
}
 
bool ScFace::isSymbolic() const
{
if (m->status == ScFace::UNKNOWN) {
m->load();
}
return m->isSymbolic();
}
 
QString ScFace::pdfAscentAsString() const
{
if (m->status == ScFace::UNKNOWN) {
237,7 → 245,7
if (m->status == ScFace::UNKNOWN) {
m->load();
}
return m->ItalicAngleAsString();
return m->italicAngleAsString();
}
 
qreal ScFace::ascent(qreal sz) const
/trunk/Scribus/scribus/fonts/scface.h
164,7 → 164,7
virtual QString pdfDescentAsString() const { return "0"; }
virtual QString pdfCapHeightAsString() const { return "0"; }
virtual QString pdfFontBBoxAsString() const { return "0 0 0 0"; }
virtual QString ItalicAngleAsString() const { return "0"; }
virtual QString italicAngleAsString() const { return "0"; }
virtual qreal descent(qreal /*sz*/) const { return 0.0; }
virtual qreal xHeight(qreal sz) const { return sz; }
virtual qreal capHeight(qreal sz) const { return sz; }
186,6 → 186,7
virtual FPointArray glyphOutline(uint gl, qreal sz) const;
virtual FPoint glyphOrigin (uint gl, qreal sz) const;
 
virtual bool isSymbolic() const { return false; }
};
 
 
200,6 → 201,9
/// test for null object
bool isNone() const { return m->status == NULLFACE; }
 
/// test if font is a symbolic font
bool isSymbolic() const;
 
ScFace& operator=(const ScFace& other);
/** two ScFaces are equal if they either are both NULLFACEs or they
agree on family, style, variant and fontpath
/trunk/Scribus/scribus/fonts/scface_ttf.cpp
500,6 → 500,13
delete kernFeature;
}
 
bool ScFace_ttf::isSymbolic() const
{
FT_Face face = ftFace();
if (!face || !face->charmap)
return false;
return (m_face->charmap->encoding == FT_ENCODING_MS_SYMBOL);
}
 
void ScFace_ttf::load() const
{
/trunk/Scribus/scribus/fonts/scface_ttf.h
98,6 → 98,8
 
qreal glyphKerning ( uint gl1, uint gl2, qreal sz ) const;
 
virtual bool isSymbolic() const;
 
private:
mutable KernFeature * kernFeature;
};
/trunk/Scribus/scribus/fonts/scfontmetrics.cpp
113,8 → 113,7
//FT_Set_Charmap(face, face->charmaps[chmapUniCode]);
retVal = 0;
}
else
if (foundEncoding)
else if (foundEncoding)
{
// qDebug() << "using special enc for" << face->family_name << face->style_name;
mapToSet=chmapCustom;
151,11 → 150,9
{
// qDebug() << "override with Unicode enc for" << face->family_name << face->style_name << "map" << mapToSet << "has only" << countCurrMap << "glyphs";
mapToSet=chmapUniCode;
//FT_Set_Charmap(face, face->charmaps[chmapUniCode]);
retVal = 0;
}
}
// if (face->charmap == NULL || mapToSet!=FT_Get_Charmap_Index(face->charmap))
FT_Set_Charmap(face, face->charmaps[mapToSet]);
// qDebug() << "set map" << mapToSet << "for" << face->family_name << face->style_name;
// qDebug() << "glyphsForNumbers 0-9:" << FT_Get_Char_Index(face, QChar('0').unicode())
/trunk/Scribus/scribus/pdflib_core.cpp
1583,7 → 1583,8
++nglyphs;
// qDebug() << QString("pdflib: nglyphs %1 max %2").arg(nglyphs).arg(face.maxGlyph());
uint FontDes = fontDescriptor;
if (Options.Version == PDFOptions::PDFVersion_X4 && (fformat == ScFace::SFNT || fformat == ScFace::TTCF))
if ((face.isSymbolic() || Options.Version == PDFOptions::PDFVersion_X4) &&
(fformat == ScFace::SFNT || fformat == ScFace::TTCF))
{
uint fontWidths2 = newObject();
StartObj(fontWidths2);
5614,7 → 5615,7
else
idx1 = idx / 224;
ScFace currentFace = style.font();
if (Options.Version == PDFOptions::PDFVersion_X4
if ((Options.Version == PDFOptions::PDFVersion_X4 || currentFace.isSymbolic())
&& (currentFace.format() == ScFace::SFNT || currentFace.format() == ScFace::TTCF)
&& ( !Options.SubsetList.contains(style.font().replacementName()) ) )
tmp+= UsedFontsP[currentFace.replacementName()]+" "+FToStr(tsz / 10.0)+" Tf\n";
5724,7 → 5725,8
tmp += "<"+QString(toHex(idx2))+"> Tj\n";
}
}
else if (Options.Version == PDFOptions::PDFVersion_X4 && (currentFace.format() == ScFace::SFNT || currentFace.format() == ScFace::TTCF))
else if ((Options.Version == PDFOptions::PDFVersion_X4 || currentFace.isSymbolic()) &&
(currentFace.format() == ScFace::SFNT || currentFace.format() == ScFace::TTCF))
{
QString val;
val.setNum(idx,16);