9#include <QtCore/qt_windows.h>
12#include <QtGui/QGuiApplication>
13#include <QtGui/private/qtgui-config_p.h>
15#include <QtCore/qmath.h>
16#include <QtCore/QDebug>
17#include <QtCore/QFile>
18#include <QtCore/QtEndian>
19#include <QtCore/QStandardPaths>
20#include <QtCore/private/qduplicatetracker_p.h>
21#include <QtCore/private/qwinregistry_p.h>
25#if QT_CONFIG(directwrite)
26# if QT_CONFIG(directwrite3)
40#if QT_CONFIG(directwrite)
43 bool isColorFont =
false)
51 if (
Q_UNLIKELY(familyName.startsWith(
"MingLiU"_L1)))
74 if (SystemParametersInfo(SPI_GETFONTSMOOTHINGTYPE, 0, &
result, 0))
77 const qreal gray_gamma = 2.31;
78 for (
int i=0;
i<256; ++
i)
81 HDC displayDC = GetDC(0);
82 hdc = CreateCompatibleDC(displayDC);
83 ReleaseDC(0, displayDC);
86unsigned QWindowsFontDatabase::m_fontOptions = 0;
103 if (SystemParametersInfo(0x200C , 0, &winSmooth, 0))
125#ifndef QT_NO_DEBUG_STREAM
131 d <<
"QFontDef(Family=\"" << def.
families.first() <<
'"';
136 <<
", stretch=" << def.
stretch <<
", hintingPreference="
144 <<
"\", lfWidth=" << lf.lfWidth <<
", lfHeight=" << lf.lfHeight <<
')';
161 case EASTEUROPE_CHARSET:
163 case TURKISH_CHARSET:
167 case RUSSIAN_CHARSET:
177 case CHINESEBIG5_CHARSET:
179 case SHIFTJIS_CHARSET:
184 case VIETNAMESE_CHARSET:
197 for (
int i = 0;
i <
name.length(); ++
i) {
198 if (
c[
i].unicode() >= 0x100)
231 PreferredFamilyId = 16,
232 PreferredStyleId = 17,
235enum PlatformFieldValue {
236 PlatformId_Unicode = 0,
237 PlatformId_Apple = 1,
238 PlatformId_Microsoft = 3
244 const int NameRecordSize = 12;
245 const int MS_LangIdEnglish = 0x009;
250 const unsigned char *
names;
262 if (string_offset >= bytes || 6 +
count*NameRecordSize > string_offset)
265 enum PlatformIdType {
272 PlatformIdType idStatus[4] = { NotFound, NotFound, NotFound, NotFound };
273 int ids[4] = { -1, -1, -1, -1 };
283 PlatformIdType *idType =
nullptr;
288 idType = &idStatus[0];
292 idType = &idStatus[1];
295 case PreferredFamilyId:
296 idType = &idStatus[2];
299 case PreferredStyleId:
300 idType = &idStatus[3];
312 if ((platform_id == PlatformId_Microsoft
313 && (encoding_id == 0 || encoding_id == 1))
314 && ((language_id & 0x3ff) == MS_LangIdEnglish
320 else if (platform_id == PlatformId_Unicode && encoding_id < 4 && *idType < Unicode) {
324 else if (platform_id == PlatformId_Apple && encoding_id == 0 && language_id == 0 && *idType < Apple) {
331 for (
int i = 0;
i < 4; ++
i) {
332 if (idStatus[
i] == NotFound)
337 const unsigned char *
string =
table + string_offset +
offset;
356 HDC hdc = GetDC( 0 );
358 memset(&lf, 0,
sizeof(LOGFONT));
360 lf.lfFaceName[faceName.
size()] = 0;
361 lf.lfCharSet = DEFAULT_CHARSET;
362 HFONT hfont = CreateFontIndirect(&lf);
369 HGDIOBJ oldobj = SelectObject( hdc, hfont );
374 unsigned char *
table = 0;
376 DWORD bytes = GetFontData( hdc, name_tag, 0, 0, 0 );
377 if ( bytes == GDI_ERROR ) {
383 table =
new unsigned char[bytes];
384 GetFontData(hdc, name_tag, 0,
table, bytes);
385 if ( bytes == GDI_ERROR )
390 i18n_name =
names.name;
392 i18n_name += u
' ' +
names.style;
396 SelectObject( hdc, oldobj );
397 DeleteObject( hfont );
409 HFONT hfont = CreateFontIndirect(&lf);
416 HGDIOBJ oldobj = SelectObject(hdc, hfont);
421 DWORD bytes = GetFontData(hdc, name_tag, 0, 0, 0);
422 if (bytes != GDI_ERROR) {
425 if (GetFontData(hdc, name_tag, 0,
table.data(), bytes) != GDI_ERROR)
429 SelectObject(hdc, oldobj);
437 struct StoreFontPayload {
438 StoreFontPayload(
const QString &family,
440 : populatedFontFamily(family)
441 , windowsFontDatabase(fontDatabase)
445 QDuplicateTracker<FontAndStyle> foundFontAndStyles;
452 const LOGFONT &logFont,
453 const TEXTMETRIC *textmetric,
454 const FONTSIGNATURE *signature,
456 StoreFontPayload *sfp)
462 uchar charSet = logFont.lfCharSet;
466 const bool fixed = !(textmetric->tmPitchAndFamily & TMPF_FIXED_PITCH);
467 const bool ttf = (textmetric->tmPitchAndFamily & TMPF_TRUETYPE);
468 const bool unreliableTextMetrics =
type == 0;
469 const bool scalable = (textmetric->tmPitchAndFamily & (TMPF_VECTOR|TMPF_TRUETYPE))
470 && !unreliableTextMetrics;
473 const bool antialias =
false;
477#ifndef QT_NO_DEBUG_OUTPUT
478 if (lcQpaFonts().isDebugEnabled()) {
481 str << __FUNCTION__ <<
' ' << familyName <<
' ' << charSet <<
" TTF=" << ttf;
482 if (
type & DEVICE_FONTTYPE)
484 if (
type & RASTER_FONTTYPE)
486 if (
type & TRUETYPE_FONTTYPE)
488 str <<
" scalable=" << scalable <<
" Size=" <<
size
489 <<
" Style=" << style <<
" Weight=" <<
weight
490 <<
" stretch=" << stretch <<
" styleName=" << styleName;
502 englishName = canonicalNames.name;
503 if (!canonicalNames.preferredName.isEmpty()) {
504 subFamilyName = familyName;
505 subFamilyStyle = styleName;
506 faceName = familyName;
507 familyName = canonicalNames.preferredName;
513 if (!canonicalNames.preferredStyle.isEmpty())
514 styleName = canonicalNames.preferredStyle;
518 if (
type & TRUETYPE_FONTTYPE) {
521 signature->fsUsb[0], signature->fsUsb[1],
522 signature->fsUsb[2], signature->fsUsb[3]
525 signature->fsCsb[0], signature->fsCsb[1]
534 familyName ==
"Segoe UI"_L1)
561 if (!subFamilyName.isEmpty()
562 && familyName != subFamilyName
563 && sfp->populatedFontFamily != familyName
568 if (!subFamilyName.isEmpty() && familyName != subFamilyName) {
573 if (!englishName.isEmpty() && englishName != familyName)
579static int QT_WIN_CALLBACK
storeFont(
const LOGFONT *logFont,
const TEXTMETRIC *textmetric,
580 DWORD
type, LPARAM lparam)
582 const ENUMLOGFONTEX *
f =
reinterpret_cast<const ENUMLOGFONTEX *
>(logFont);
589 const FONTSIGNATURE *signature =
nullptr;
590 StoreFontPayload *sfp =
reinterpret_cast<StoreFontPayload *
>(lparam);
592 if (
type & TRUETYPE_FONTTYPE) {
593 signature = &
reinterpret_cast<const NEWTEXTMETRICEX *
>(textmetric)->ntmFontSig;
596 if (sfp->foundFontAndStyles.hasSeen({familyName, styleName}))
609 if (m_hasPopulatedAliases)
613 for (
const QString &family : families)
615 m_hasPopulatedAliases =
true;
622 qCDebug(lcQpaFonts) << familyName;
623 if (familyName.
size() >= LF_FACESIZE) {
624 qCDebug(lcQpaFonts) <<
"Unable to enumerate family '" << familyName <<
'\'';
627 HDC dummy = GetDC(0);
629 lf.lfCharSet = DEFAULT_CHARSET;
631 lf.lfFaceName[familyName.
size()] = 0;
632 lf.lfPitchAndFamily = 0;
633 StoreFontPayload sfp(familyName,
this);
642 const ENUMLOGFONTEX *
f =
reinterpret_cast<const ENUMLOGFONTEX *
>(logFont);
643 const wchar_t *faceNameW =
f->elfLogFont.lfFaceName;
644 if (faceNameW[0] && faceNameW[0] != L
'@' && wcsncmp(faceNameW, L
"WST_", 4)) {
648 const bool ttf = (textmetric->tmPitchAndFamily & TMPF_TRUETYPE);
651 if (!englishName.isEmpty())
662 if (fontPath.isEmpty())
674void QWindowsFontDatabase::addDefaultEUDCFont()
678 if (
path.isEmpty()) {
679 qCDebug(lcQpaFonts) <<
"There's no default EUDC font specified";
685 qCDebug(lcQpaFonts) <<
"Unable to locate default EUDC font:" <<
path;
700 HDC dummy = GetDC(0);
702 lf.lfCharSet = DEFAULT_CHARSET;
703 lf.lfFaceName[0] = 0;
704 lf.lfPitchAndFamily = 0;
711 addDefaultEUDCFont();
723 static const int hfontMetaTypeId = qRegisterMetaType<HFONT>();
724 static const int logFontMetaTypeId = qRegisterMetaType<LOGFONT>();
728 if (lcQpaFonts().isDebugEnabled()) {
729 QSharedPointer<QWindowsFontEngineData>
d =
data();
730 qCDebug(lcQpaFonts) << __FUNCTION__ <<
"Clear type: "
731 <<
d->clearTypeEnabled <<
"gamma: " <<
d->fontSmoothingGamma;
743 const QString faceName = fontHandle->faceName.
left(LF_FACESIZE - 1);
747 qCDebug(lcQpaFonts) << __FUNCTION__ <<
"FONTDEF" << fontDef << fe <<
handle;
756#if QT_CONFIG(directwrite)
757 if (!useDirectWrite(hintingPreference))
765 QString uniqueFamilyName = u
'f'
772 QString actualFontName =
font.changeFamilyName(uniqueFamilyName);
773 if (actualFontName.isEmpty()) {
774 qWarning(
"%s: Can't change family name of font", __FUNCTION__);
781 AddFontMemResourceEx(
const_cast<char *
>(newFontData.constData()),
782 DWORD(newFontData.size()), 0, &
count);
783 if (
count == 0 && fontHandle != 0) {
784 RemoveFontMemResourceEx(fontHandle);
788 if (fontHandle == 0) {
789 qWarning(
"%s: AddFontMemResourceEx failed", __FUNCTION__);
795 request.hintingPreference = hintingPreference;
804 qWarning(
"%s: Failed to load font. Got fallback instead: %s", __FUNCTION__,
818#if QT_CONFIG(directwrite) && QT_CONFIG(direct2d)
829 UniqueFontData uniqueData{};
830 uniqueData.handle = fontHandle;
831 ++uniqueData.refCount;
833 const std::scoped_lock
lock(m_uniqueFontDataMutex);
834 m_uniqueFontData[uniqueFamilyName] = uniqueData;
838 RemoveFontMemResourceEx(fontHandle);
846#if QT_CONFIG(directwrite) && QT_CONFIG(direct2d)
859 if (fileEndSentinel -
fontData < 12) {
860 qCWarning(lcQpaFonts) <<
"Corrupted font data detected";
876 const quint32 maximumNumFonts = 0xffff;
878 if (numFonts > maximumNumFonts) {
879 qCWarning(lcQpaFonts) <<
"Font collection of" << numFonts <<
"fonts is too large. Aborting.";
887 qCWarning(lcQpaFonts) <<
"Corrupted font data detected";
895 if (fileEndSentinel -
data >= 6) {
896 const quint16 numTables = qFromBigEndian<quint16>(
data + 4);
897 if (fileEndSentinel -
data >= 28 + 16 * (numTables - 1)) {
902 if (
quintptr(fileEndSentinel - fileBegin) <= tableOffset) {
903 qCWarning(lcQpaFonts) <<
"Corrupted font data detected";
906 *
table = fileBegin + tableOffset;
909 qCWarning(lcQpaFonts) <<
"Corrupted font data detected";
916 qCWarning(lcQpaFonts) <<
"Corrupted font data detected";
919 qCWarning(lcQpaFonts) <<
"Corrupted font data detected";
927 QList<QFontNames> *families,
928 QList<FONTSIGNATURE> *signatures,
929 QList<QFontValues> *
values)
948 if (
names.name.isEmpty())
951 families->append(std::move(
names));
953 if (
values || signatures) {
963 fontValues.
weight = qFromBigEndian<quint16>(
table + 4);
965 quint16 fsSelection = qFromBigEndian<quint16>(
table + 62);
966 fontValues.isItalic = (fsSelection & 1) != 0;
967 fontValues.isUnderlined = (fsSelection & (1 << 1)) != 0;
968 fontValues.isOverstruck = (fsSelection & (1 << 4)) != 0;
970 values->append(std::move(fontValues));
974 FONTSIGNATURE signature;
977 signature.fsUsb[0] = qFromBigEndian<quint32>(
table + 42);
978 signature.fsUsb[1] = qFromBigEndian<quint32>(
table + 46);
979 signature.fsUsb[2] = qFromBigEndian<quint32>(
table + 50);
980 signature.fsUsb[3] = qFromBigEndian<quint32>(
table + 54);
982 signature.fsCsb[0] = qFromBigEndian<quint32>(
table + 78);
983 signature.fsCsb[1] = qFromBigEndian<quint32>(
table + 82);
985 memset(&signature, 0,
sizeof(signature));
987 signatures->append(signature);
994 WinApplicationFont
font;
996 QList<FONTSIGNATURE> signatures;
997 QList<QFontValues> fontValues;
998 QList<QFontNames> families;
1003 if (families.isEmpty())
1008 AddFontMemResourceEx(
const_cast<char *
>(
fontData.constData()),
1009 DWORD(
fontData.size()), 0, &dummy);
1010 if (
font.handle == 0)
1014 for (
int j = 0;
j < families.count(); ++
j) {
1015 const auto &family = families.at(
j);
1016 const QString &familyName = family.name;
1017 const QString &styleName = family.style;
1018 familyNames << familyName;
1021 memset(&lf, 0,
sizeof(LOGFONT));
1022 memcpy(lf.lfFaceName, familyName.
data(),
sizeof(
wchar_t) *
qMin(LF_FACESIZE - 1, familyName.
size()));
1023 lf.lfCharSet = DEFAULT_CHARSET;
1025 lf.lfWeight =
values.weight;
1029 lf.lfStrikeOut = TRUE;
1031 lf.lfUnderline = TRUE;
1032 HFONT hfont = CreateFontIndirect(&lf);
1033 HGDIOBJ oldobj = SelectObject(hdc, hfont);
1035 if (applicationFont !=
nullptr) {
1045 TEXTMETRIC textMetrics;
1046 GetTextMetrics(hdc, &textMetrics);
1048 StoreFontPayload sfp(familyName,
this);
1050 TRUETYPE_FONTTYPE, &sfp);
1052 SelectObject(hdc, oldobj);
1053 DeleteObject(hfont);
1066 if (families.isEmpty())
1069 if (AddFontResourceExW((
wchar_t*)
fileName.utf16(), FR_PRIVATE, 0) == 0)
1075 for (
int j = 0;
j < families.count(); ++
j) {
1076 const QString familyName = families.at(
j).name;
1077 familyNames << familyName;
1079 if (applicationFont !=
nullptr) {
1080 const QString &styleName = families.at(
j).style;
1096 m_applicationFonts <<
font;
1103 for (
const WinApplicationFont &
font : std::as_const(m_applicationFonts)) {
1105 RemoveFontMemResourceEx(
font.handle);
1107 RemoveFontResourceExW(
reinterpret_cast<LPCWSTR
>(
font.fileName.utf16()),
1108 FR_PRIVATE,
nullptr);
1111 m_applicationFonts.
clear();
1112 m_eudcFonts.clear();
1124 if (fontFace !=
nullptr)
1125 fontFace->Release();
1147 const std::scoped_lock
lock(m_uniqueFontDataMutex);
1148 const auto it = m_uniqueFontData.
find(uniqueFont);
1149 if (
it != m_uniqueFontData.
end()) {
1150 if (--
it->refCount == 0) {
1151 RemoveFontMemResourceEx(
it->handle);
1159 const std::scoped_lock
lock(m_uniqueFontDataMutex);
1160 const auto it = m_uniqueFontData.
find(uniqueFont);
1161 if (
it != m_uniqueFontData.
end())
1169 result.append(m_eudcFonts);
1173 qCDebug(lcQpaFonts) << __FUNCTION__ << family << style << styleHint
1181 const QSharedPointer<QWindowsFontEngineData> &
data)
1189 HFONT hfont = CreateFontIndirect(&lf);
1191 qErrnoWarning(
"%s: CreateFontIndirect failed", __FUNCTION__);
1195 HGDIOBJ oldObj = SelectObject(
data->hdc, hfont);
1197 if (!GetTextMetrics(
data->hdc, &tm))
1200 lf.lfWidth = tm.tmAveCharWidth *
request.stretch / 100;
1201 SelectObject(
data->hdc, oldObj);
1203 DeleteObject(hfont);
1206#if QT_CONFIG(directwrite) && QT_CONFIG(direct2d)
1207 if (
data->directWriteFactory !=
nullptr) {
1210 if (nameSubstitute != fam) {
1211 const int nameSubstituteLength =
qMin(nameSubstitute.length(), LF_FACESIZE - 1);
1212 memcpy(lf.lfFaceName, nameSubstitute.data(), nameSubstituteLength *
sizeof(
wchar_t));
1213 lf.lfFaceName[nameSubstituteLength] = 0;
1216 HFONT hfont = CreateFontIndirect(&lf);
1218 qErrnoWarning(
"%s: CreateFontIndirect failed", __FUNCTION__);
1220 HGDIOBJ oldFont = SelectObject(
data->hdc, hfont);
1224 bool useDw = useDirectWrite(hintingPreference, fam);
1226 IDWriteFontFace *directWriteFontFace = NULL;
1227 HRESULT hr =
data->directWriteGdiInterop->CreateFontFaceFromHdc(
data->hdc, &directWriteFontFace);
1228 if (SUCCEEDED(hr)) {
1229 bool isColorFont =
false;
1230 bool needsSimulation =
false;
1231#if QT_CONFIG(direct2d)
1232 IDWriteFontFace2 *directWriteFontFace2 =
nullptr;
1233 if (SUCCEEDED(directWriteFontFace->QueryInterface(__uuidof(IDWriteFontFace2),
1234 reinterpret_cast<void **
>(&directWriteFontFace2)))) {
1235 if (directWriteFontFace2->IsColorFont())
1236 isColorFont = directWriteFontFace2->GetPaletteEntryCount() > 0;
1238 needsSimulation = directWriteFontFace2->GetSimulations() != DWRITE_FONT_SIMULATIONS_NONE;
1240 directWriteFontFace2->Release();
1243 useDw = useDw || useDirectWrite(hintingPreference, fam, isColorFont) || needsSimulation;
1245 << __FUNCTION__ <<
request.families.first() <<
request.pointSize <<
"pt"
1246 <<
"hintingPreference=" << hintingPreference <<
"color=" << isColorFont
1248 <<
"useDirectWrite=" << useDw;
1255 GetTextFace(
data->hdc, 64,
n);
1259 fedw->initFontInfo(fontDef, dpi);
1262 directWriteFontFace->Release();
1265 qWarning().noquote().nospace() <<
"DirectWrite: CreateFontFaceFromHDC() failed ("
1266 << errorString <<
") for " <<
request <<
' ' << lf <<
" dpi=" << dpi;
1269 SelectObject(
data->hdc, oldFont);
1270 DeleteObject(hfont);
1277 if (preferClearTypeAA)
1279 few->initFontInfo(
request, dpi);
T loadRelaxed() const noexcept
QFILE_MAYBE_NODISCARD bool open(OpenMode flags) override
Opens the file using OpenMode mode, returning true if successful; otherwise false.
bool exists() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
WritingSystem
\value Any \value Latin \value Greek \value Cyrillic \value Armenian \value Hebrew \value Arabic \val...
static QStringList families(WritingSystem writingSystem=Any)
Returns a sorted list of the available font families which support the writingSystem.
StyleHint
Style hints are used by the \l{QFont}{font matching} algorithm to find an appropriate default family ...
Stretch
Predefined stretch values that follow the CSS naming convention.
Weight
Qt uses a weighting scale from 1 to 1000 compatible with OpenType.
Style
This enum describes the different styles of glyphs that are used to display text.
QByteArray readAll()
Reads all remaining data from the device, and returns it as a byte array.
iterator erase(const_iterator it)
iterator find(const Key &key)
static QString locate(StandardLocation type, const QString &fileName, LocateOptions options=LocateFile)
\macro QT_RESTRICTED_CAST_FROM_ASCII
QString left(qsizetype n) const &
qsizetype toWCharArray(wchar_t *array) const
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
void truncate(qsizetype pos)
Truncates the string at the given position index.
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
qsizetype size() const noexcept
Returns the number of characters in this string.
const QChar at(qsizetype i) const
Returns the character at the given index position in the string.
QChar * data()
Returns a pointer to the data stored in the QString.
static QString fromWCharArray(const wchar_t *string, qsizetype size=-1)
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString & append(QChar c)
The QSupportedWritingSystems class is used when registering fonts with the internal Qt fontdatabase.
bool supported(QFontDatabase::WritingSystem) const
Returns true if the writing system specified by writingSystem is supported; otherwise returns false.
void setSupported(QFontDatabase::WritingSystem, bool supported=true)
Sets or clears support for the specified writingSystem based on the value given by support.
QString stringValue(QStringView subKey) const
static QFont systemDefaultFont()
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,...
static QStringList extraTryFontsForFamily(const QString &family)
static HFONT systemFont()
static int defaultVerticalDPI()
void invalidate() override
This function is called whenever the font database is invalidated.
static QSharedPointer< QWindowsFontEngineData > data()
static LOGFONT fontDefToLOGFONT(const QFontDef &fontDef, const QString &faceName)
static QString familyForStyleHint(QFont::StyleHint styleHint)
Font database for Windows.
static unsigned fontOptions()
void populateFontDatabase() override
This function is called once at startup by Qt's internal font database.
@ DontUseDirectWriteFonts
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 populateFamily(const QString &familyName) override
This function is called whenever a lazily populated family, populated through registerFontFamily(),...
void releaseHandle(void *handle) override
Releases the specified font handle.
QString fontDir() const override
Returns the directory containing the fonts used by the database.
void derefUniqueFont(const QString &uniqueFont)
static qreal fontSmoothingGamma()
void invalidate() override
This function is called whenever the font database is invalidated.
static void setFontOptions(unsigned options)
bool isPrivateFontFamily(const QString &family) const override
Returns true if the font family is private.
bool populateFamilyAliases(const QString &missingFamily) override
void refUniqueFont(const QString &uniqueFont)
void removeApplicationFonts()
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...
static QFontEngine * createEngine(const QFontDef &request, const QString &faceName, int dpi, const QSharedPointer< QWindowsFontEngineData > &data)
bool fontsAlwaysScalable() const override
Return true if all fonts are considered scalable when using this font database.
~QWindowsFontDatabase() override
static void debugFormat(QDebug &d, const LOGFONT &lf)
QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const override
Returns a list of alternative fonts for the specified family and style and script using the styleHint...
Windows font engine using Direct Write.
static QString fontNameSubstitute(const QString &familyName)
Standard Windows font engine.
QSet< QString >::iterator it
void qErrnoWarning(const char *msg,...)
Combined button and popup list for selecting options.
#define QT_WARNING_DISABLE_GCC(text)
QList< QString > QStringList
Constructs a string list that contains the given string, str.
AudioChannelLayoutTag tag
static const QCssKnownValue properties[NumProperties - 1]
DBusConnection const char DBusError * error
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
constexpr T qFromBigEndian(T source)
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
int qRound(qfloat16 d) noexcept
static Q_CONSTINIT qreal fontSmoothingGamma
Q_DECL_COLD_FUNCTION Q_CORE_EXPORT QString qt_error_string(int errorCode=-1)
#define qCWarning(category,...)
#define qCDebug(category,...)
constexpr const T & qMin(const T &a, const T &b)
GLenum GLsizei GLsizei GLint * values
[15]
GLuint64 GLenum void * handle
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei const GLuint * ids
GLsizei const GLchar ** strings
[1]
GLenum GLuint GLenum GLsizei length
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint GLuint GLfloat weight
GLuint GLsizei const GLchar * message
GLenum GLuint GLintptr offset
GLenum GLsizeiptr const void * fontData
GLuint GLsizei const GLuint const GLintptr * offsets
GLsizei const GLchar *const * path
GLenum GLenum GLsizei void * table
static QString absolutePath(const QString &path)
#define Q_ASSERT_X(cond, x, msg)
#define qPrintable(string)
#define CLEARTYPE_QUALITY
unsigned long long quint64
static QList< quint32 > getTrueTypeFontOffsets(const uchar *fontData, const uchar *fileEndSentinel)
QFontNames qt_getCanonicalFontNames(const LOGFONT &lf)
QString qt_getEnglishName(const QString &familyName, bool includeStyle)
static void getFontTable(const uchar *fileBegin, const uchar *fileEndSentinel, const uchar *data, quint32 tag, const uchar **table, quint32 *length)
static int QT_WIN_CALLBACK storeFont(const LOGFONT *logFont, const TEXTMETRIC *textmetric, DWORD type, LPARAM lparam)
bool qt_localizedName(const QString &name)
static QFontDatabase::WritingSystem writingSystemFromCharSet(uchar charSet)
static int QT_WIN_CALLBACK populateFontFamilies(const LOGFONT *logFont, const TEXTMETRIC *textmetric, DWORD, LPARAM)
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)
QDebug operator<<(QDebug d, const QFontDef &def)
quint16 qt_getUShort(const unsigned char *p)
QTextStream out(stdout)
[7]
QNetworkRequest request(url)
The QFont::Tag type provides access to advanced font features.
\inmodule QtCore \reentrant
IDWriteFontFace * fontFace
FontHandle(const QString &name)