* Returns the freetype face or 0 in case of an empty file or any other problems
* (like not being able to open the file)
*/
-QFreetypeFace *QFreetypeFace::getFace(const QFontEngine::FaceId &face_id,
- const QByteArray &fontData)
+QFreetypeFace *QFreetypeFace::getFace(const QFontEngine::FaceId &face_id)
{
- if (face_id.filename.isEmpty() && fontData.isEmpty())
+ if (face_id.filename.isEmpty())
return 0;
QtFreetypeData *freetypeData = qt_getFreetypeData();
}
newFreetype->fontData = file.readAll();
}
- } else {
- newFreetype->fontData = fontData;
}
if (!newFreetype->fontData.isEmpty()) {
if (FT_New_Memory_Face(freetypeData->library, (const FT_Byte *)newFreetype->fontData.constData(), newFreetype->fontData.size(), face_id.index, &face)) {
freeServerGlyphSet(transformedGlyphSets.at(i).id);
}
-bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format,
- const QByteArray &fontData)
+bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format)
{
- return init(faceId, antialias, format, QFreetypeFace::getFace(faceId, fontData));
+ return init(faceId, antialias, format, QFreetypeFace::getFace(faceId));
}
bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format,
QFontEngine::Properties properties() const;
bool getSfntTable(uint tag, uchar *buffer, uint *length) const;
- static QFreetypeFace *getFace(const QFontEngine::FaceId &face_id,
- const QByteArray &fontData = QByteArray());
+ static QFreetypeFace *getFace(const QFontEngine::FaceId &face_id);
void release(const QFontEngine::FaceId &face_id);
// locks the struct for usage. Any read/write operations require locking.
QFontEngineFT(const QFontDef &fd);
virtual ~QFontEngineFT();
- bool init(FaceId faceId, bool antiaalias, GlyphFormat defaultFormat = Format_None,
- const QByteArray &fontData = QByteArray());
+ bool init(FaceId faceId, bool antiaalias, GlyphFormat defaultFormat = Format_None);
bool init(FaceId faceId, bool antialias, GlyphFormat format,
QFreetypeFace *freetypeFace);