Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwindowsfontdatabase_ft_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 QWINDOWSFONTDATABASEFT_H
5#define QWINDOWSFONTDATABASEFT_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 <QtGui/private/qfreetypefontdatabase_p.h>
19#include <QtCore/QSharedPointer>
20#include <QtCore/qt_windows.h>
21
23
24class Q_GUI_EXPORT QWindowsFontDatabaseFT : public QFreeTypeFontDatabase
25{
26public:
27 void populateFontDatabase() override;
28 bool populateFamilyAliases(const QString &familyName) override;
29 void populateFamily(const QString &familyName) override;
30 QFontEngine *fontEngine(const QFontDef &fontDef, void *handle) override;
31 QFontEngine *fontEngine(const QByteArray &fontData, qreal pixelSize,
32 QFont::HintingPreference hintingPreference) override;
33
34 QStringList fallbacksForFamily(const QString &family, QFont::Style style,
35 QFont::StyleHint styleHint,
36 QFontDatabasePrivate::ExtendedScript script) const override;
37
38 QString fontDir() const override;
39 QFont defaultFont() const override;
40
41 bool m_hasPopulatedAliases = false;
42};
43
44QT_END_NAMESPACE
45
46#endif // QWINDOWSFONTDATABASEFT_H
static QList< quint32 > getTrueTypeFontOffsets(const uchar *fontData, const uchar *fileEndSentinel)
static void getFontTable(const uchar *fileBegin, const uchar *fileEndSentinel, const uchar *data, quint32 tag, const uchar **table, quint32 *length)
static QFontDatabase::WritingSystem writingSystemFromCharSet(uchar charSet)
static bool addFontToDatabase(QString familyName, QString styleName, const LOGFONT &logFont, const TEXTMETRIC *textmetric, const FONTSIGNATURE *signature, int type, StoreFontPayload *sfp)
static void getFamiliesAndSignatures(const QByteArray &fontData, QList< QFontNames > *families, QList< FONTSIGNATURE > *signatures, QList< QFontValues > *values)
QFontNames qt_getCanonicalFontNames(const LOGFONT &lf)
QString qt_getEnglishName(const QString &familyName, bool includeStyle=false)
bool qt_localizedName(const QString &name)