Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
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 int instanceIndex = -1;
30
31 // Note: The data may be implicitly shared throughout the
32 // font database and platform font database, so be careful
33 // to never detach when accessing this member!
35};
36
38{
39public:
40 void populateFontDatabase() override;
41 QFontEngine *fontEngine(const QFontDef &fontDef, void *handle) override;
42 QFontEngine *fontEngine(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference) override;
43 QStringList addApplicationFont(const QByteArray &fontData, const QString &fileName, QFontDatabasePrivate::ApplicationFont *applicationFont = nullptr) override;
44 void releaseHandle(void *handle) override;
45 bool supportsVariableApplicationFonts() const override;
46
47 static void addNamedInstancesForFace(void *face, int faceIndex,
48 const QString &family, const QString &styleName,
50 QFont::Style style, bool fixedPitch,
51 const QSupportedWritingSystems &writingSystems,
52 const QByteArray &fileName, const QByteArray &fontData);
53
54 static QStringList addTTFile(const QByteArray &fontData, const QByteArray &file, QFontDatabasePrivate::ApplicationFont *applicationFont = nullptr);
55};
56
58
59#endif // QFREETYPEFONTDATABASE_H
\inmodule QtCore
Definition qbytearray.h:57
HintingPreference
Definition qfont.h:55
Stretch
Predefined stretch values that follow the CSS naming convention.
Definition qfont.h:83
Weight
Qt uses a weighting scale from 1 to 1000 compatible with OpenType.
Definition qfont.h:63
Style
This enum describes the different styles of glyphs that are used to display text.
Definition qfont.h:76
The QPlatformFontDatabase class makes it possible to customize how fonts are discovered and how they ...
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
The QSupportedWritingSystems class is used when registering fonts with the internal Qt fontdatabase.
Combined button and popup list for selecting options.
GLenum GLsizeiptr const void GLsizei faceIndex
GLuint64 GLenum void * handle
GLenum face
GLuint GLuint GLfloat weight
GLenum GLsizeiptr const void * fontData
double qreal
Definition qtypes.h:187
QFile file
[0]
const QByteArray data