Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
qfreetypefontdatabase_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 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 QFREETYPEFONTDATABASE_H
5#define QFREETYPEFONTDATABASE_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 <QtCore/QByteArray>
20#include <QtCore/QString>
21#include <QtCore/private/qglobal_p.h>
22
24
26{
29
30 // Note: The data may be implicitly shared throughout the
31 // font database and platform font database, so be careful
32 // to never detach when accessing this member!
34};
35
37{
38public:
39 void populateFontDatabase() override;
40 QFontEngine *fontEngine(const QFontDef &fontDef, void *handle) override;
41 QFontEngine *fontEngine(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference) override;
43 void releaseHandle(void *handle) override;
44
45 static QStringList addTTFile(const QByteArray &fontData, const QByteArray &file, QFontDatabasePrivate::ApplicationFont *applicationFont = nullptr);
46};
47
49
50#endif // QFREETYPEFONTDATABASE_H
\inmodule QtCore
Definition qbytearray.h:57
HintingPreference
Definition qfont.h:52
The QPlatformFontDatabase class makes it possible to customize how fonts are discovered and how they ...
virtual QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName, QFontDatabasePrivate::ApplicationFont *font=nullptr)
Adds an application font described by the font contained supplied fontData or using the font containe...
virtual QFontEngine * fontEngine(const QFontDef &fontDef, void *handle)
Returns the font engine that can be used to render the font described by the font definition,...
virtual void releaseHandle(void *handle)
Releases the specified font handle.
virtual void populateFontDatabase()
This function is called once at startup by Qt's internal font database.
\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
QFile file
[0]
const QByteArray data