Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qfontconfigdatabase_p.h
Go to the documentation of this file.
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
22
23class QFontEngineFT;
24
25class Q_GUI_EXPORT QFontconfigDatabase : public QFreeTypeFontDatabase
26{
27public:
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;
36 QString resolveFontFamilyAlias(const QString &family) const override;
37 QFont defaultFont() const override;
38
39private:
40 void setupFontEngine(QFontEngineFT *engine, const QFontDef &fontDef) const;
41};
42
44
45#endif // QFONTCONFIGDATABASE_H
\inmodule QtCore
Definition qbytearray.h:57
Script
Definition qchar.h:144
\reentrant
Definition qfont.h:20
StyleHint
Style hints are used by the \l{QFont}{font matching} algorithm to find an appropriate default family ...
Definition qfont.h:23
HintingPreference
Definition qfont.h:52
Style
This enum describes the different styles of glyphs that are used to display text.
Definition qfont.h:73
QFontEngine * fontEngine(const QFontDef &fontDef, void *handle) override
Returns the font engine that can be used to render the font described by the font definition,...
void populateFontDatabase() override
This function is called once at startup by Qt's internal font database.
QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName, QFontDatabasePrivate::ApplicationFont *applicationFont=nullptr) override
Adds an application font described by the font contained supplied fontData or using the font containe...
virtual QFont defaultFont() const
Returns the default system font.
virtual QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const
Returns a list of alternative fonts for the specified family and style and script using the styleHint...
virtual QFontEngineMulti * fontEngineMulti(QFontEngine *fontEngine, QChar::Script script)
Returns a multi font engine in the specified script to encapsulate fontEngine with the option to fall...
virtual QString resolveFontFamilyAlias(const QString &family) const
Resolve alias to actual font family names.
virtual void invalidate()
This function is called whenever the font database is invalidated.
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
Combined button and popup list for selecting options.
GLuint64 GLenum void * handle
GLenum GLsizeiptr const void * fontData
double qreal
Definition qtypes.h:92
QJSEngine engine
[0]