Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 24719 → Rev 24720

/trunk/Scribus/scribus/fonts/ftface.cpp
41,20 → 41,6
*****/
 
FtFace::FtFace(const QString& fam, const QString& sty, const QString& vari, const QString& scname, const QString& psname, const QString& path, int face, const QStringList& features)
: m_face(nullptr),
m_isBold(false),
m_isItalic(false),
m_encoding(0.0),
m_uniEM(0.0),
m_ascent(0.0),
m_descent(0.0),
m_height(0.0),
m_xHeight(0.0),
m_capHeight(0.0),
m_maxAdvanceWidth(0.0),
m_underlinePos(0.0),
m_strikeoutPos(0.0),
m_strokeWidth(0.0)
{
family = fam;
style = sty;
70,7 → 56,8
}
 
 
FtFace::~FtFace() {
FtFace::~FtFace()
{
unload();
}
 
/trunk/Scribus/scribus/fonts/ftface.h
55,11 → 55,10
 
FtFace(const QString& fam, const QString& sty, const QString& variant, const QString& scname,
const QString& psname, const QString& path, int face, const QStringList& features);
~FtFace() override;
 
FT_Face ftFace() const override;
 
virtual ~FtFace();
 
// font metrics
qreal ascent(qreal sz=1.0) const override { return m_ascent * sz; }
qreal descent(qreal sz=1.0) const override { return m_descent * sz; }
97,12 → 96,12
void loadGlyph (ScFace::gid_type gl) const override;
 
protected:
mutable FT_Face m_face;
mutable FT_Face m_face { nullptr };
 
static FT_Library m_library;
 
mutable bool m_isBold;
mutable bool m_isItalic;
mutable bool m_isBold { false };
mutable bool m_isItalic { false };
 
mutable QString m_pdfAscent;
mutable QString m_pdfCapHeight;
110,18 → 109,18
mutable QString m_italicAngle;
mutable QString m_pdfFontBBox;
 
mutable int m_encoding;
mutable int m_encoding { 0 };
 
mutable qreal m_uniEM;
mutable qreal m_ascent;
mutable qreal m_descent;
mutable qreal m_height;
mutable qreal m_xHeight;
mutable qreal m_capHeight;
mutable qreal m_maxAdvanceWidth;
mutable qreal m_underlinePos;
mutable qreal m_strikeoutPos;
mutable qreal m_strokeWidth;
mutable qreal m_uniEM { 0.0 };
mutable qreal m_ascent { 0.0 };
mutable qreal m_descent { 0.0 };
mutable qreal m_height { 0.0 };
mutable qreal m_xHeight { 0.0 };
mutable qreal m_capHeight { 0.0 };
mutable qreal m_maxAdvanceWidth { 0.0 };
mutable qreal m_underlinePos { 0.0 };
mutable qreal m_strikeoutPos { 0.0 };
mutable qreal m_strokeWidth { 0.0 };
 
QString uniGlyphNameToUnicode(const QString& glyphName) const;
};
/trunk/Scribus/scribus/fonts/scface.cpp
385,7 → 385,6
// clear caches
m_m->m_glyphWidth.clear();
m_m->m_glyphOutline.clear();
//m->m_cMap.clear();
m_m->status = ScFace::UNKNOWN;
}
 
/trunk/Scribus/scribus/fonts/scface.h
154,7 → 154,6
// caches
mutable QHash<gid_type, qreal> m_glyphWidth;
mutable QHash<gid_type, GlyphData> m_glyphOutline;
//mutable QHash<gid_type, uint> m_cMap;
void* m_hbFont {nullptr};
 
// fill caches & members
163,7 → 162,6
{
m_glyphWidth.clear();
m_glyphOutline.clear();
//m_cMap.clear();
 
status = qMax(m_cachedStatus, ScFace::LOADED);
}
172,7 → 170,6
{
m_glyphWidth.clear();
m_glyphOutline.clear();
//m_cMap.clear();
 
status = ScFace::UNKNOWN;
}