1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QFONTCONFIGDATABASE_H |
5 | #define QFONTCONFIGDATABASE_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <qpa/qplatformfontdatabase.h> |
19 | #include <QtGui/private/qfreetypefontdatabase_p.h> |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | class QFontEngineFT; |
24 | |
25 | class Q_GUI_EXPORT QFontconfigDatabase : public QFreeTypeFontDatabase |
26 | { |
27 | public: |
28 | ~QFontconfigDatabase() override; |
29 | void populateFontDatabase() override; |
30 | void invalidate() override; |
31 | QFontEngineMulti *fontEngineMulti(QFontEngine *fontEngine, QChar::Script script) override; |
32 | QFontEngine *fontEngine(const QFontDef &fontDef, void *handle) override; |
33 | QFontEngine *fontEngine(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference) override; |
34 | QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const override; |
35 | QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName, QFontDatabasePrivate::ApplicationFont *applicationFont = nullptr) override; |
36 | QString resolveFontFamilyAlias(const QString &family) const override; |
37 | QFont defaultFont() const override; |
38 | |
39 | private: |
40 | void setupFontEngine(QFontEngineFT *engine, const QFontDef &fontDef) const; |
41 | }; |
42 | |
43 | QT_END_NAMESPACE |
44 | |
45 | #endif // QFONTCONFIGDATABASE_H |
46 | |