9#include <QtCore/qt_windows.h>
12#include <QtGui/QGuiApplication>
13#include <QtGui/private/qhighdpiscaling_p.h>
14#include <QtGui/private/qtgui-config_p.h>
16#include <QtCore/qmath.h>
17#include <QtCore/QDebug>
18#include <QtCore/QFile>
19#include <QtCore/QtEndian>
20#include <QtCore/QStandardPaths>
21#include <QtCore/private/qduplicatetracker_p.h>
22#include <QtCore/private/qwinregistry_p.h>
26#if QT_CONFIG(directwrite)
27# if QT_CONFIG(directwrite3)
39#if QT_CONFIG(directwrite)
42 bool isColorFont =
false)
50 if (
Q_UNLIKELY(familyName.startsWith(
"MingLiU"_L1)))
73 if (SystemParametersInfo(SPI_GETFONTSMOOTHINGTYPE, 0, &
result, 0))
76 const qreal gray_gamma = 2.31;
77 for (
int i=0;
i<256; ++
i)
80 HDC displayDC = GetDC(0);
81 hdc = CreateCompatibleDC(displayDC);
82 ReleaseDC(0, displayDC);
85unsigned QWindowsFontDatabase::m_fontOptions = 0;
102 if (SystemParametersInfo(0x200C , 0, &winSmooth, 0))
124#ifndef QT_NO_DEBUG_STREAM
130 d <<
"QFontDef(Family=\"" << def.
families.first() <<
'"';
135 <<
", stretch=" << def.
stretch <<
", hintingPreference="
143 <<
"\", lfWidth=" << lf.lfWidth <<
", lfHeight=" << lf.lfHeight <<
')';
160 case EASTEUROPE_CHARSET:
162 case TURKISH_CHARSET:
166 case RUSSIAN_CHARSET:
176 case CHINESEBIG5_CHARSET:
178 case SHIFTJIS_CHARSET:
183 case VIETNAMESE_CHARSET:
197#define MAKE_TAG(ch1, ch2, ch3, ch4) (\
198 (((quint32)(ch4)) << 24) | \
199 (((quint32)(ch3)) << 16) | \
200 (((quint32)(ch2)) << 8) | \
207 for (
int i = 0;
i <
name.length(); ++
i) {
208 if (
c[
i].unicode() >= 0x100)
241 PreferredFamilyId = 16,
242 PreferredStyleId = 17,
245enum PlatformFieldValue {
246 PlatformId_Unicode = 0,
247 PlatformId_Apple = 1,
248 PlatformId_Microsoft = 3
254 const int NameRecordSize = 12;
255 const int MS_LangIdEnglish = 0x009;
260 const unsigned char *
names;
272 if (string_offset >= bytes || 6 +
count*NameRecordSize > string_offset)
275 enum PlatformIdType {
282 PlatformIdType idStatus[4] = { NotFound, NotFound, NotFound, NotFound };
283 int ids[4] = { -1, -1, -1, -1 };
293 PlatformIdType *idType =
nullptr;
298 idType = &idStatus[0];
302 idType = &idStatus[1];
305 case PreferredFamilyId:
306 idType = &idStatus[2];
309 case PreferredStyleId:
310 idType = &idStatus[3];
322 if ((platform_id == PlatformId_Microsoft
323 && (encoding_id == 0 || encoding_id == 1))
324 && ((language_id & 0x3ff) == MS_LangIdEnglish
330 else if (platform_id == PlatformId_Unicode && encoding_id < 4 && *idType < Unicode) {
334 else if (platform_id == PlatformId_Apple && encoding_id == 0 && language_id == 0 && *idType < Apple) {
341 for (
int i = 0;
i < 4; ++
i) {
342 if (idStatus[
i] == NotFound)
347 const unsigned char *
string =
table + string_offset +
offset;
366 HDC hdc = GetDC( 0 );
368 memset(&lf, 0,
sizeof(LOGFONT));
370 lf.lfFaceName[faceName.
size()] = 0;
371 lf.lfCharSet = DEFAULT_CHARSET;
372 HFONT hfont = CreateFontIndirect(&lf);
379 HGDIOBJ oldobj = SelectObject( hdc, hfont );
381 const DWORD name_tag =
MAKE_TAG(
'n',
'a',
'm',
'e' );
384 unsigned char *
table = 0;
386 DWORD bytes = GetFontData( hdc, name_tag, 0, 0, 0 );
387 if ( bytes == GDI_ERROR ) {
393 table =
new unsigned char[bytes];
394 GetFontData(hdc, name_tag, 0,
table, bytes);
395 if ( bytes == GDI_ERROR )
400 i18n_name =
names.name;
402 i18n_name += u
' ' +
names.style;
406 SelectObject( hdc, oldobj );
407 DeleteObject( hfont );
419 HFONT hfont = CreateFontIndirect(&lf);
426 HGDIOBJ oldobj = SelectObject(hdc, hfont);
430 const DWORD name_tag =
MAKE_TAG(
'n',
'a',
'm',
'e');
431 DWORD bytes = GetFontData(hdc, name_tag, 0, 0, 0);
432 if (bytes != GDI_ERROR) {
435 if (GetFontData(hdc, name_tag, 0,
table.data(), bytes) != GDI_ERROR)
439 SelectObject(hdc, oldobj);
448 QChar *faceNamePtr =
nullptr;
450 const int nameLength =
qMin(faceName.
length(), LF_FACESIZE - 1);
451 faceNamePtr =
new QChar[nameLength + 1];
452 memcpy(
static_cast<void *
>(faceNamePtr), faceName.
data(),
sizeof(
wchar_t) * nameLength);
453 faceNamePtr[nameLength] = u
'\0';
459 struct StoreFontPayload {
460 StoreFontPayload(
const QString &family,
462 : populatedFontFamily(family)
463 , windowsFontDatabase(fontDatabase)
474 const LOGFONT &logFont,
475 const TEXTMETRIC *textmetric,
476 const FONTSIGNATURE *signature,
478 StoreFontPayload *sfp)
484 uchar charSet = logFont.lfCharSet;
488 const bool fixed = !(textmetric->tmPitchAndFamily & TMPF_FIXED_PITCH);
489 const bool ttf = (textmetric->tmPitchAndFamily & TMPF_TRUETYPE);
490 const bool unreliableTextMetrics =
type == 0;
491 const bool scalable = (textmetric->tmPitchAndFamily & (TMPF_VECTOR|TMPF_TRUETYPE))
492 && !unreliableTextMetrics;
495 const bool antialias =
false;
499#ifndef QT_NO_DEBUG_OUTPUT
500 if (lcQpaFonts().isDebugEnabled()) {
503 str << __FUNCTION__ <<
' ' << familyName <<
' ' << charSet <<
" TTF=" << ttf;
504 if (
type & DEVICE_FONTTYPE)
506 if (
type & RASTER_FONTTYPE)
508 if (
type & TRUETYPE_FONTTYPE)
510 str <<
" scalable=" << scalable <<
" Size=" <<
size
511 <<
" Style=" << style <<
" Weight=" <<
weight
512 <<
" stretch=" << stretch <<
" styleName=" << styleName;
524 englishName = canonicalNames.
name;
526 subFamilyName = familyName;
527 subFamilyStyle = styleName;
528 faceName = familyName;
540 if (
type & TRUETYPE_FONTTYPE) {
543 signature->fsUsb[0], signature->fsUsb[1],
544 signature->fsUsb[2], signature->fsUsb[3]
547 signature->fsCsb[0], signature->fsCsb[1]
556 familyName ==
"Segoe UI"_L1)
568 && familyName != subFamilyName
569 && sfp->populatedFontFamily != familyName
571 sfp->windowsFontDatabase->populateFamily(familyName);
575 style, stretch, antialias, scalable,
size, fixed, writingSystems,
createFontFile(faceName));
580 style, stretch, antialias, scalable,
size, fixed, writingSystems,
createFontFile(faceName));
588 if (!subFamilyName.
isEmpty() && familyName != subFamilyName) {
590 style, stretch, antialias, scalable,
size, fixed, writingSystems,
createFontFile(faceName));
593 if (!englishName.
isEmpty() && englishName != familyName)
599static int QT_WIN_CALLBACK
storeFont(
const LOGFONT *logFont,
const TEXTMETRIC *textmetric,
600 DWORD
type, LPARAM lparam)
602 const ENUMLOGFONTEX *
f =
reinterpret_cast<const ENUMLOGFONTEX *
>(logFont);
609 const FONTSIGNATURE *signature =
nullptr;
610 StoreFontPayload *sfp =
reinterpret_cast<StoreFontPayload *
>(lparam);
612 if (
type & TRUETYPE_FONTTYPE) {
613 signature = &
reinterpret_cast<const NEWTEXTMETRICEX *
>(textmetric)->ntmFontSig;
616 if (sfp->foundFontAndStyles.hasSeen({familyName, styleName}))
629 if (m_hasPopulatedAliases)
633 for (
const QString &family : families)
635 m_hasPopulatedAliases =
true;
642 qCDebug(lcQpaFonts) << familyName;
643 if (familyName.
size() >= LF_FACESIZE) {
644 qCDebug(lcQpaFonts) <<
"Unable to enumerate family '" << familyName <<
'\'';
647 HDC dummy = GetDC(0);
649 lf.lfCharSet = DEFAULT_CHARSET;
651 lf.lfFaceName[familyName.
size()] = 0;
652 lf.lfPitchAndFamily = 0;
653 StoreFontPayload sfp(familyName,
this);
662 const ENUMLOGFONTEX *
f =
reinterpret_cast<const ENUMLOGFONTEX *
>(logFont);
663 const wchar_t *faceNameW =
f->elfLogFont.lfFaceName;
664 if (faceNameW[0] && faceNameW[0] != L
'@' && wcsncmp(faceNameW, L
"WST_", 4)) {
668 const bool ttf = (textmetric->tmPitchAndFamily & TMPF_TRUETYPE);
694void QWindowsFontDatabase::addDefaultEUDCFont()
698 if (
path.isEmpty()) {
699 qCDebug(lcQpaFonts) <<
"There's no default EUDC font specified";
705 qCDebug(lcQpaFonts) <<
"Unable to locate default EUDC font:" <<
path;
720 HDC dummy = GetDC(0);
722 lf.lfCharSet = DEFAULT_CHARSET;
723 lf.lfFaceName[0] = 0;
724 lf.lfPitchAndFamily = 0;
731 addDefaultEUDCFont();
736 removeApplicationFonts();
742 static const int hfontMetaTypeId = qRegisterMetaType<HFONT>();
743 static const int logFontMetaTypeId = qRegisterMetaType<LOGFONT>();
747 if (lcQpaFonts().isDebugEnabled()) {
749 qCDebug(lcQpaFonts) << __FUNCTION__ <<
"Clear type: "
750 <<
d->clearTypeEnabled <<
"gamma: " <<
d->fontSmoothingGamma;
756 removeApplicationFonts();
765 qCDebug(lcQpaFonts) << __FUNCTION__ <<
"FONTDEF" << fontDef << fe <<
handle;
774#if QT_CONFIG(directwrite)
775 if (!useDirectWrite(hintingPreference))
783 QString uniqueFamilyName = u
'f'
790 QString actualFontName =
font.changeFamilyName(uniqueFamilyName);
791 if (actualFontName.isEmpty()) {
792 qWarning(
"%s: Can't change family name of font", __FUNCTION__);
799 AddFontMemResourceEx(
const_cast<char *
>(newFontData.
constData()),
801 if (
count == 0 && fontHandle != 0) {
802 RemoveFontMemResourceEx(fontHandle);
806 if (fontHandle == 0) {
807 qWarning(
"%s: AddFontMemResourceEx failed", __FUNCTION__);
813 request.hintingPreference = hintingPreference;
822 qWarning(
"%s: Failed to load font. Got fallback instead: %s", __FUNCTION__,
836#if QT_CONFIG(directwrite) && QT_CONFIG(direct2d)
847 UniqueFontData uniqueData;
848 uniqueData.handle = fontHandle;
849 uniqueData.refCount.ref();
850 m_uniqueFontData[uniqueFamilyName] = uniqueData;
853 RemoveFontMemResourceEx(fontHandle);
861#if QT_CONFIG(directwrite) && QT_CONFIG(direct2d)
875 if (headerTag !=
MAKE_TAG(
't',
't',
'c',
'f')) {
876 if (headerTag !=
MAKE_TAG(0, 1, 0, 0)
877 && headerTag !=
MAKE_TAG(
'O',
'T',
'T',
'O')
878 && headerTag !=
MAKE_TAG(
't',
'r',
'u',
'e')
879 && headerTag !=
MAKE_TAG(
't',
'y',
'p',
'1'))
885 for (
uint i = 0;
i < numFonts; ++
i) {
886 offsets << qFromBigEndian<quint32>(
fontData + 12 +
i * 4);
893 const quint16 numTables = qFromBigEndian<quint16>(
data + 4);
894 for (
uint i = 0;
i < numTables; ++
i) {
926 if (
names.name.isEmpty())
938 fontValues.
weight = qFromBigEndian<quint16>(
table + 4);
940 quint16 fsSelection = qFromBigEndian<quint16>(
table + 62);
941 fontValues.
isItalic = (fsSelection & 1) != 0;
942 fontValues.
isUnderlined = (fsSelection & (1 << 1)) != 0;
943 fontValues.
isOverstruck = (fsSelection & (1 << 4)) != 0;
945 values->append(std::move(fontValues));
949 FONTSIGNATURE signature;
952 signature.fsUsb[0] = qFromBigEndian<quint32>(
table + 42);
953 signature.fsUsb[1] = qFromBigEndian<quint32>(
table + 46);
954 signature.fsUsb[2] = qFromBigEndian<quint32>(
table + 50);
955 signature.fsUsb[3] = qFromBigEndian<quint32>(
table + 54);
957 signature.fsCsb[0] = qFromBigEndian<quint32>(
table + 78);
958 signature.fsCsb[1] = qFromBigEndian<quint32>(
table + 82);
960 memset(&signature, 0,
sizeof(signature));
962 signatures->
append(signature);
969 WinApplicationFont
font;
983 AddFontMemResourceEx(
const_cast<char *
>(
fontData.constData()),
985 if (
font.handle == 0)
989 for (
int j = 0;
j < families.
count(); ++
j) {
990 const auto &family = families.
at(
j);
991 const QString &familyName = family.name;
992 const QString &styleName = family.style;
993 familyNames << familyName;
996 memset(&lf, 0,
sizeof(LOGFONT));
997 memcpy(lf.lfFaceName, familyName.
data(),
sizeof(
wchar_t) *
qMin(LF_FACESIZE - 1, familyName.
size()));
998 lf.lfCharSet = DEFAULT_CHARSET;
1000 lf.lfWeight =
values.weight;
1004 lf.lfStrikeOut = TRUE;
1006 lf.lfUnderline = TRUE;
1007 HFONT hfont = CreateFontIndirect(&lf);
1008 HGDIOBJ oldobj = SelectObject(hdc, hfont);
1010 if (applicationFont !=
nullptr) {
1020 TEXTMETRIC textMetrics;
1021 GetTextMetrics(hdc, &textMetrics);
1023 StoreFontPayload sfp(familyName,
this);
1025 TRUETYPE_FONTTYPE, &sfp);
1027 SelectObject(hdc, oldobj);
1028 DeleteObject(hfont);
1044 if (AddFontResourceExW((
wchar_t*)
fileName.utf16(), FR_PRIVATE, 0) == 0)
1050 for (
int j = 0;
j < families.
count(); ++
j) {
1051 const QString familyName = families.
at(
j).name;
1052 familyNames << familyName;
1054 if (applicationFont !=
nullptr) {
1055 const QString &styleName = families.
at(
j).style;
1071 m_applicationFonts <<
font;
1076void QWindowsFontDatabase::removeApplicationFonts()
1078 for (
const WinApplicationFont &
font :
std::as_const(m_applicationFonts)) {
1080 RemoveFontMemResourceEx(
font.handle);
1082 RemoveFontResourceExW(
reinterpret_cast<LPCWSTR
>(
font.fileName.utf16()),
1083 FR_PRIVATE,
nullptr);
1086 m_applicationFonts.
clear();
1087 m_eudcFonts.clear();
1110 if (m_uniqueFontData.
contains(uniqueFont)) {
1111 if (!m_uniqueFontData[uniqueFont].refCount.deref()) {
1112 RemoveFontMemResourceEx(m_uniqueFontData[uniqueFont].
handle);
1113 m_uniqueFontData.
remove(uniqueFont);
1120 if (m_uniqueFontData.
contains(uniqueFont))
1121 m_uniqueFontData[uniqueFont].refCount.ref();
1128 result.append(m_eudcFonts);
1132 qCDebug(lcQpaFonts) << __FUNCTION__ << family << style << styleHint
1148 HFONT hfont = CreateFontIndirect(&lf);
1150 qErrnoWarning(
"%s: CreateFontIndirect failed", __FUNCTION__);
1154 HGDIOBJ oldObj = SelectObject(
data->hdc, hfont);
1156 if (!GetTextMetrics(
data->hdc, &tm))
1159 lf.lfWidth = tm.tmAveCharWidth *
request.stretch / 100;
1160 SelectObject(
data->hdc, oldObj);
1162 DeleteObject(hfont);
1165#if QT_CONFIG(directwrite) && QT_CONFIG(direct2d)
1166 if (
data->directWriteFactory !=
nullptr) {
1169 if (nameSubstitute != fam) {
1170 const int nameSubstituteLength =
qMin(nameSubstitute.
length(), LF_FACESIZE - 1);
1171 memcpy(lf.lfFaceName, nameSubstitute.
data(), nameSubstituteLength *
sizeof(
wchar_t));
1172 lf.lfFaceName[nameSubstituteLength] = 0;
1175 HFONT hfont = CreateFontIndirect(&lf);
1177 qErrnoWarning(
"%s: CreateFontIndirect failed", __FUNCTION__);
1179 HGDIOBJ oldFont = SelectObject(
data->hdc, hfont);
1183 bool useDw = useDirectWrite(hintingPreference, fam);
1185 IDWriteFontFace *directWriteFontFace = NULL;
1186 HRESULT hr =
data->directWriteGdiInterop->CreateFontFaceFromHdc(
data->hdc, &directWriteFontFace);
1187 if (SUCCEEDED(hr)) {
1188 bool isColorFont =
false;
1189#if QT_CONFIG(direct2d)
1190 IDWriteFontFace2 *directWriteFontFace2 =
nullptr;
1191 if (SUCCEEDED(directWriteFontFace->QueryInterface(__uuidof(IDWriteFontFace2),
1192 reinterpret_cast<void **
>(&directWriteFontFace2)))) {
1193 if (directWriteFontFace2->IsColorFont())
1194 isColorFont = directWriteFontFace2->GetPaletteEntryCount() > 0;
1196 directWriteFontFace2->Release();
1199 useDw = useDw || useDirectWrite(hintingPreference, fam, isColorFont);
1201 << __FUNCTION__ <<
request.families.first() <<
request.pointSize <<
"pt"
1202 <<
"hintingPreference=" << hintingPreference <<
"color=" << isColorFont
1204 <<
"useDirectWrite=" << useDw;
1211 GetTextFace(
data->hdc, 64,
n);
1221 directWriteFontFace->Release();
1224 qWarning().noquote().nospace() <<
"DirectWrite: CreateFontFaceFromHDC() failed ("
1225 << errorString <<
") for " <<
request <<
' ' << lf <<
" dpi=" << dpi;
1228 SelectObject(
data->hdc, oldFont);
1229 DeleteObject(hfont);
1236 if (preferClearTypeAA)
T loadRelaxed() const noexcept
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
constexpr char16_t unicode() const noexcept
Returns the numeric Unicode value of the QChar.
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 ...
QStringList families() const
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.
bool isEmpty() const noexcept
const_reference at(qsizetype i) const noexcept
qsizetype count() const noexcept
void append(parameter_type t)
bool contains(const Key &key) const
size_type remove(const Key &key)
static QString locate(StandardLocation type, const QString &fileName, LocateOptions options=LocateFile)
\macro QT_RESTRICTED_CAST_FROM_ASCII
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.
qsizetype size() const
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.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
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...
qsizetype length() const
Returns the number of characters in this string.
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()
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)
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.
void initFontInfo(const QFontDef &request, int dpi)
static QString fontNameSubstitute(const QString &familyName)
Standard Windows font engine.
void initFontInfo(const QFontDef &request, int dpi)
void qErrnoWarning(const char *msg,...)
Combined button and popup list for selecting options.
#define QT_WARNING_DISABLE_GCC(text)
AudioChannelLayoutTag tag
static const QCssKnownValue properties[NumProperties - 1]
DBusConnection const char DBusError * error
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
GLuint GLuint GLfloat weight
GLuint GLsizei const GLchar * message
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
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
QFontNames qt_getCanonicalFontNames(const LOGFONT &lf)
QString qt_getEnglishName(const QString &familyName, bool includeStyle)
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)
#define MAKE_TAG(ch1, ch2, ch3, ch4)
static QList< quint32 > getTrueTypeFontOffsets(const uchar *fontData)
static int QT_WIN_CALLBACK populateFontFamilies(const LOGFONT *logFont, const TEXTMETRIC *textmetric, DWORD, LPARAM)
static QChar * createFontFile(const QString &faceName)
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)
static void getFontTable(const uchar *fileBegin, const uchar *data, quint32 tag, const uchar **table, quint32 *length)
QDebug operator<<(QDebug d, const QFontDef &def)
quint16 qt_getUShort(const unsigned char *p)
QTextStream out(stdout)
[7]
QNetworkRequest request(url)
QList< Properties > properties
\inmodule QtCore \reentrant