4#ifndef QWINDOWSFONTDATABASE_H
5#define QWINDOWSFONTDATABASE_H
20#include <qpa/qplatformfontdatabase.h>
21#include <QtCore/QSharedPointer>
22#include <QtCore/QLoggingCategory>
23#include <QtCore/qhashfunctions.h>
24#include <QtCore/qmutex.h>
25#include <QtCore/qt_windows.h>
37 DontUseDirectWriteFonts = 0x40,
38 DontUseColorFonts = 0x80
46 void populateFontDatabase()
override;
47 void invalidate()
override;
48 void removeApplicationFonts();
50 void populateFamily(
const QString &familyName)
override;
51 bool populateFamilyAliases(
const QString &missingFamily)
override;
56 void releaseHandle(
void *
handle)
override;
57 QString fontDir()
const override;
60 bool fontsAlwaysScalable()
const override;
61 void derefUniqueFont(
const QString &uniqueFont);
62 void refUniqueFont(
const QString &uniqueFont);
63 bool isPrivateFontFamily(
const QString &family)
const override;
67 const QSharedPointer<QWindowsFontEngineData> &
data);
71 static void setFontOptions(
unsigned options);
72 static unsigned fontOptions();
74#ifndef QT_NO_DEBUG_STREAM
75 static void debugFormat(
QDebug &
d,
const LOGFONT &lf);
83 IDWriteFontFace *fontFace =
nullptr;
88 void addDefaultEUDCFont();
90 struct WinApplicationFont {
95 QList<WinApplicationFont> m_applicationFonts;
97 struct UniqueFontData {
102 QMutex m_uniqueFontDataMutex;
103 QMap<QString, UniqueFontData> m_uniqueFontData;
105 static unsigned m_fontOptions;
107 bool m_hasPopulatedAliases =
false;
110#ifndef QT_NO_DEBUG_STREAM
148 {
return lhs.font == rhs.font && lhs.style == rhs.style; }
StyleHint
Style hints are used by the \l{QFont}{font matching} algorithm to find an appropriate default family ...
Style
This enum describes the different styles of glyphs that are used to display text.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Font database for Windows.
QFont defaultFont() const override
Returns the default system font.
void ensureFamilyPopulated(const QString &familyName)
Combined button and popup list for selecting options.
static QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script)
Engine * createEngine(QGeoServiceProviderPrivate *)
static Q_CONSTINIT qreal fontSmoothingGamma
constexpr QtPrivate::QHashMultiReturnType< T... > qHashMulti(size_t seed, const T &... args) noexcept(std::conjunction_v< QtPrivate::QNothrowHashable< T >... >)
GLuint64 GLenum void * handle
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint GLuint GLfloat weight
GLenum GLsizeiptr const void * fontData
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
quint16 qt_getUShort(const unsigned char *p)
QFontNames qt_getCanonicalFontNames(const LOGFONT &lf)
QString qt_getEnglishName(const QString &familyName, bool includeStyle=false)
QDebug operator<<(QDebug, const QFontDef &def)
size_t qHash(const FontAndStyle &key, size_t seed) noexcept
bool qt_localizedName(const QString &name)
QNetworkRequest request(url)
friend bool operator!=(const FontAndStyle &lhs, const FontAndStyle &rhs) noexcept
friend bool operator==(const FontAndStyle &lhs, const FontAndStyle &rhs) noexcept
FontHandle(const QString &name)