15#include <qpa/qplatformintegration.h>
17#include <QtGui/private/qguiapplication_p.h>
18#include <qpa/qplatformfontdatabase.h>
19#include <qpa/qplatformtheme.h>
21#include <QtCore/qcache.h>
22#include <QtCore/qmath.h>
27#include <qtgui_tracepoints_p.h>
30#include <QtGui/private/qwindowsfontdatabasebase_p.h>
40#define SMOOTH_SCALABLE 0xffff
42#if defined(QT_BUILD_INTERNAL)
43bool qt_enable_test_font =
false;
47 qt_enable_test_font =
value;
68 if (
s ==
"normal"_L1 ||
s ==
"regular"_L1)
72 if (
s ==
"semibold"_L1 ||
s ==
"semi bold"_L1 ||
s ==
"demibold"_L1 ||
s ==
"demi bold"_L1)
83 if (
s.startsWith(
"ex"_L1) ||
s.startsWith(
"ul"_L1)) {
84 if (
s2 ==
"tralight"_L1 ||
s ==
"tra light"_L1)
86 if (
s2 ==
"trabold"_L1 ||
s2 ==
"tra bold"_L1)
92 if (
s.contains(
"bold"_L1)) {
93 if (
s.contains(
"demi"_L1))
97 if (
s.contains(
"thin"_L1))
99 if (
s.contains(
"light"_L1))
101 if (
s.contains(
"black"_L1))
111 if (
s == translatedBold)
120 if (
s == translatedLight)
132 if (
s.contains(translatedBold)) {
137 if (
s.contains(translatedExtra))
142 if (
s.contains(translatedLight)) {
143 if (
s.contains(translatedExtra))
158 if (styleString.
contains(
"Italic"_L1))
160 else if (styleString.
contains(
"Oblique"_L1))
230 if (
f.isNull() &&
count == 1)
245 foundries = newFoundries;
249 return foundries[
count++];
274 delete families[
count];
279 for (
auto &
font : applicationFonts)
280 font.properties.clear();
288 qCDebug(lcFontDb) <<
"Invalidating font database";
292 fallbacksCache.clear();
312 pos = (high + low) / 2;
318 if (!fam && (
flags & EnsureCreated)) {
328 families = newFamilies;
333 families[
pos] = family;
339 if (fam && (
flags & EnsurePopulated)) {
405 size_t ws = writingSystem;
432 int i =
name.indexOf(u
'[');
433 int li =
name.lastIndexOf(u
']');
434 if (
i >= 0 && li >= 0 &&
i < li) {
436 if (
i > 0 &&
name[
i - 1] == u
' ')
449 if (space) *
s =
s->toUpper();
450 space =
s->isSpace();
458 if (space) *
s =
s->toUpper();
459 space =
s->isSpace();
477 family =
desc.family->name;
478 if (!
desc.foundry->name.isEmpty() &&
desc.family->count > 1)
479 family +=
" ["_L1 +
desc.foundry->name + u
']';
482 if (
desc.style->smoothScalable
509 for (
int i = 0,
size = family_list.size();
i <
size; ++
i)
521 db->fallbacksCache.clear();
528 return fontDatabaseMutex();
540 bool scalable,
int pixelSize,
bool fixedPitch,
544 qCDebug(lcFontDb) <<
"Adding font: familyName" << familyName <<
"stylename" << stylename <<
"weight" <<
weight
545 <<
"style" << style <<
"pixelSize" <<
pixelSize <<
"antialiased" <<
antialiased <<
"fixed" << fixedPitch;
547 styleKey.
style = style;
551 f->fixedPitch = fixedPitch;
574 qCDebug(lcFontDb) <<
"Registering family" << familyName;
585 qCDebug(lcFontDb) <<
"Registering alias" << alias <<
"to family" << familyName;
595 f->aliases.push_back(alias);
602 for (
int i = 0;
i <
d->count; ++
i)
603 if (
d->families[
i]->matchesFamilyName(alias))
604 return d->families[
i]->name;
613 return f !=
nullptr &&
f->populated;
636 for (
int i = 0;
i <
db->count; ++
i) {
639 f->ensurePopulated();
644 for (
int j = 0;
j <
f->count; ++
j) {
647 for (
int k = 0; k < foundry->
count; ++k) {
650 :
f->name +
" ["_L1 + foundry->
name + u
']';
652 preferredFallbacks.append(
name);
654 otherFallbacks.append(
name);
659 return preferredFallbacks + otherFallbacks;
669 if (
const QStringList *fallbacks =
db->fallbacksCache.object(cacheKey))
675 QStringList::iterator
i;
676 for (
i = retList.begin();
i != retList.end(); ++
i) {
678 for (
int j = 0;
j <
db->count;
j++) {
679 if (
db->families[
j]->matchesFamilyName(*
i)) {
685 i = retList.erase(
i);
690 db->fallbacksCache.insert(cacheKey,
new QStringList(retList));
701QFontEngine *QFontDatabasePrivate::loadSingleEngine(
int script,
727 if (
Q_LIKELY(cacheForCommonScript)) {
735 qWarning(
" OpenType support missing for \"%s\", script %d",
760 qWarning(
" OpenType support missing for \"%s\", script %d",
762 if (
engine->ref.loadRelaxed() == 0)
792 if (!
request.fallBackFamilies.isEmpty()) {
833 for (
int i = 0;
i < foundry->
count;
i++ ) {
862 qCDebug(lcFontMatch,
" best style has distance 0x%x",
dist );
863 return foundry->
styles[best];
867unsigned int QFontDatabasePrivate::bestFoundry(
int script,
unsigned int score,
int styleStrategy,
875 desc->foundry =
nullptr;
876 desc->style =
nullptr;
877 desc->size =
nullptr;
882 for (
int x = 0;
x < family->
count; ++
x) {
887 qCDebug(lcFontMatch,
" looking for matching style in foundry '%s' %d",
893 qCDebug(lcFontMatch,
" ForceOutline set, but not smoothly scalable");
904 qCDebug(lcFontMatch,
" found exact size match (%d pixels)",
size->pixelSize);
905 px =
size->pixelSize;
913 qCDebug(lcFontMatch,
" found smoothly scalable font (%d pixels)",
pixelSize);
931 for (
int x = 0;
x < style->
count; ++
x) {
951 qCDebug(lcFontMatch,
" no size supports the script we want");
967 unsigned int this_score = 0x0000;
969 PitchMismatch = 0x4000,
970 StyleMismatch = 0x2000,
971 BitmapScaledPenalty = 0x1000
976 this_score += PitchMismatch;
978 if (styleKey != style->
key)
979 this_score += StyleMismatch;
981 this_score += BitmapScaledPenalty;
985 if (this_score < score) {
986 qCDebug(lcFontMatch,
" found a match: score %x best score so far %x",
990 desc->foundry = foundry;
994 qCDebug(lcFontMatch,
" score %x no better than best %x", this_score, score);
1005 return f->matchesFamilyName(familyName);
1015 unsigned int *resultingScore)
1024 char pitch =
request.ignorePitch ?
'*' :
request.fixedPitch ?
'm' :
'p';
1027 qCDebug(lcFontMatch,
"QFontDatabasePrivate::match\n"
1029 " family: %s [%s], script: %d\n"
1031 " weight: %d, style: %d\n"
1035 family_name.
isEmpty() ?
"-- first in script --" : family_name.toLatin1().constData(),
1036 foundry_name.isEmpty() ?
"-- any --" : foundry_name.toLatin1().constData(), script,
1040 desc->family =
nullptr;
1041 desc->foundry =
nullptr;
1042 desc->style =
nullptr;
1043 desc->size =
nullptr;
1045 unsigned int score = ~0u;
1055 for (
int x = 0;
x <
db->count; ++
x) {
1072 unsigned int newscore =
1073 bestFoundry(script, score,
request.styleStrategy,
1074 test.
family, foundry_name, styleKey,
request.pixelSize, pitch,
1079 newscore = bestFoundry(script, score,
request.styleStrategy, test.
family,
1081 pitch, &test,
request.styleName);
1084 if (newscore < score) {
1093 if (resultingScore !=
nullptr)
1094 *resultingScore = score;
1130 return result.simplified();
1326 if (!
d->populated) {
1330 qCDebug(lcFontDb) <<
"Populating font database";
1333 qFatal(
"QFontDatabase: Must construct a QGuiApplication before accessing QFontDatabase");
1338 for (
int i = 0;
i <
d->applicationFonts.size();
i++) {
1339 auto *
font = &
d->applicationFonts[
i];
1340 if (!
font->isNull() && !
font->isPopulated())
1341 platformFontDatabase->addApplicationFont(
font->data,
font->fileName,
font);
1347 d->populated =
true;
1364 quint64 writingSystemsFound = 0;
1365 static_assert(WritingSystemsCount < 64);
1367 for (
int i = 0;
i <
d->count; ++
i) {
1372 if (family->
count == 0)
1374 for (
uint x = Latin;
x <
uint(WritingSystemsCount); ++
x) {
1376 writingSystemsFound |=
quint64(1) <<
x;
1385 for (
uint x = Latin ;
x <
uint(WritingSystemsCount); ++
x) {
1386 if (writingSystemsFound & (
quint64(1) <<
x))
1401 QString familyName, foundryName;
1409 if (!
f ||
f->count == 0)
1412 for (
int x = Latin;
x < WritingSystemsCount; ++
x) {
1437 for (
int i = 0;
i <
d->count;
i++) {
1439 if (
f->populated &&
f->count == 0)
1441 if (writingSystem != Any) {
1442 if (!
f->ensurePopulated())
1447 if (!
f->populated ||
f->count == 1) {
1448 flist.append(
f->name);
1450 for (
int j = 0;
j <
f->count;
j++) {
1474 QString familyName, foundryName;
1486 for (
int j = 0;
j <
f->count;
j++) {
1489 for (
int k = 0; k < foundry->
count; k++) {
1497 l.reserve(allStyles.
count);
1498 for (
int i = 0;
i < allStyles.
count;
i++) {
1517 QString familyName, foundryName;
1524 return (
f &&
f->fixedPitch);
1541 QString familyName, foundryName;
1551 for (
int j = 0;
j <
f->count;
j++) {
1554 for (
int k = 0; k < foundry->
count; k++)
1580 QString familyName, foundryName;
1588 for (
int i = 0;
i <
d->count;
i++) {
1589 if (
d->families[
i]->matchesFamilyName(familyName)) {
1591 if (
f->ensurePopulated())
1599 for (
int j = 0;
j <
f->count;
j++) {
1602 for (
int k = 0; k < foundry->
count; k++) {
1631 if (isSmoothlyScalable(family, style))
1633 return isBitmapScalable(family, style);
1647 return standardSizes();
1650 QString familyName, foundryName;
1659 if (!fam)
return sizes;
1665 for (
int j = 0;
j < fam->
count;
j++) {
1669 if (!style)
continue;
1675 for (
int l = 0; l < style->
count; l++) {
1679 const int pointSize =
qRound(
size->pixelSize * 72.0 / dpi);
1680 if (!
sizes.contains(pointSize))
1681 sizes.append(pointSize);
1688 return standardSizes();
1703 QString familyName, foundryName;
1712 for (
int j = 0;
j <
f->count;
j++) {
1715 for (
int k = 0; k < foundry->
count; k++)
1728 if (!
s->styleName.isEmpty())
1729 fnt.setStyleName(
s->styleName);
1746 return standardSizes();
1749 QString familyName, foundryName;
1764 for (
int j = 0;
j < fam->
count;
j++) {
1768 if (!style)
continue;
1774 for (
int l = 0; l < style->
count; l++) {
1778 const int pointSize =
qRound(
size->pixelSize * 72.0 / dpi);
1779 if (!
sizes.contains(pointSize))
1780 sizes.append(pointSize);
1813 QString familyName, foundryName;
1821 if (!
f)
return false;
1823 for (
int j = 0;
j <
f->count;
j++) {
1826 for (
int k = 0; k < foundry->
count; k++)
1846 QString familyName, foundryName;
1854 if (!
f)
return false;
1856 for (
int j = 0;
j <
f->count;
j++) {
1860 for (
int k = 0; k < foundry->
count; k++)
1881 QString familyName, foundryName;
1891 for (
int j = 0;
j <
f->count;
j++) {
1895 for (
int k = 0; k < foundry->
count; k++)
1909 QString parsedFamily, foundry;
1916 for (
int i = 0;
i <
d->count;
i++) {
1918 if (
f->populated &&
f->count == 0)
1952 const char *
name =
nullptr;
1953 switch (writingSystem) {
2029 case SimplifiedChinese:
2032 case TraditionalChinese:
2057 Q_ASSERT_X(
false,
"QFontDatabase::writingSystemName",
"invalid 'writingSystem' parameter");
2069 switch (writingSystem) {
2077 return u
"Aa\x00C3\x00E1Zz";
2079 return u
"\x0393\x03B1\x03A9\x03C9";
2081 return u
"\x0414\x0434\x0436\x044f";
2083 return u
"\x053f\x054f\x056f\x057f";
2085 return u
"\x05D0\x05D1\x05D2\x05D3";
2087 return u
"\x0623\x0628\x062C\x062F\x064A\x0629\x0020\x0639\x0631\x0628\x064A\x0629";
2089 return u
"\x0715\x0725\x0716\x0726";
2091 return u
"\x0784\x0794\x078c\x078d";
2093 return u
"\x0905\x0915\x0925\x0935";
2095 return u
"\x0986\x0996\x09a6\x09b6";
2097 return u
"\x0a05\x0a15\x0a25\x0a35";
2099 return u
"\x0a85\x0a95\x0aa5\x0ab5";
2101 return u
"\x0b06\x0b16\x0b2b\x0b36";
2103 return u
"\x0b89\x0b99\x0ba9\x0bb9";
2105 return u
"\x0c05\x0c15\x0c25\x0c35";
2107 return u
"\x0c85\x0c95\x0ca5\x0cb5";
2109 return u
"\x0d05\x0d15\x0d25\x0d35";
2111 return u
"\x0d90\x0da0\x0db0\x0dc0";
2113 return u
"\x0e02\x0e12\x0e22\x0e32";
2115 return u
"\x0e8d\x0e9d\x0ead\x0ebd";
2117 return u
"\x0f00\x0f01\x0f02\x0f03";
2119 return u
"\x1000\x1001\x1002\x1003";
2121 return u
"\x10a0\x10b0\x10c0\x10d0";
2123 return u
"\x1780\x1790\x17b0\x17c0";
2125 return u
"\x4e2d\x6587\x8303\x4f8b";
2127 return u
"\x4e2d\x6587\x7bc4\x4f8b";
2129 return u
"\x30b5\x30f3\x30d7\x30eb\x3067\x3059";
2131 return u
"\xac00\xac11\xac1a\xac2f";
2133 return u
"\x1ED7\x1ED9\x1ED1\x1ED3";
2135 return u
"\x1681\x1682\x1683\x1684";
2137 return u
"\x16a0\x16a1\x16a2\x16a3";
2139 return u
"\x7ca\x7cb\x7cc\x7cd";
2167 for (
i = 0;
i < applicationFonts.size(); ++
i)
2168 if (applicationFonts.at(
i).isNull())
2170 if (
i >= applicationFonts.size()) {
2172 i = applicationFonts.size() - 1;
2180 if (
font.properties.isEmpty())
2183 applicationFonts[
i] =
font;
2196 for (
int i = 0;
i < applicationFonts.size(); ++
i)
2197 if (applicationFonts.at(
i).fileName ==
fileName)
2267 ret.reserve(
d->applicationFonts.value(
id).properties.size());
2269 for (
const auto &
properties :
d->applicationFonts.value(
id).properties)
2298 case SmallestReadableFont:
2307 return integration->fontDatabase()->defaultFont();
2328 if (handle < 0 || handle >=
db->applicationFonts.size())
2354 if (!
db ||
db->applicationFonts.isEmpty())
2357 db->applicationFonts.clear();
2367 bool preferScriptOverFamily)
2370 ensureFontDatabase();
2377 ->sanitizeRequest(req);
2382#if defined(QT_BUILD_INTERNAL)
2384 if (qt_enable_test_font &&
request.families.first() ==
"__Qt__Box__Engine__"_L1) {
2400 qCDebug(lcFontMatch,
"Cache hit level 1");
2404 if (
request.pixelSize > 0xffff) {
2406 qCDebug(lcFontMatch,
"Rejecting request for pixel size %g2, returning box engine",
double(
request.pixelSize));
2410 QString family_name, foundry_name;
2415 unsigned int score = UINT_MAX;
2426 if (
index < 0 && !multi && !preferScriptOverFamily)
2443 qCDebug(lcFontMatch,
" NO MATCH FOUND\n");
2447 if (!requestFamily.
isEmpty()) {
2460 for (
int i = 0; !
engine &&
i < fallbacks.size();
i++) {
2487 qCDebug(lcFontMatch,
"returning box engine");
2507 if (!
d->engineData) {
2512 if (!
d->request.families.isEmpty())
2516 if (!
d->engineData) {
2521 d->engineData->ref.ref();
2525 if (
d->engineData->engines[script])
2545 if (!families.isEmpty()) {
2547 if (! family_list.contains(defaultFamily))
2548 family_list << defaultFamily;
2557 for (; !fe &&
it !=
end; ++
it) {
2579 if (!
d->engineData->engines[
i]) {
2580 d->engineData->engines[
i] = fe;
2585 d->engineData->engines[script] = fe;
2605 for (
int i = 0;
i < families.size(); ++
i) {
2606 const QString &family = families.at(
i);
2609 for (
int x = 0;
x <
db->count; ++
x) {
2611 testFamily =
db->families[
x];
2618 if (testFamily ==
nullptr
2626 return supported.
values();
2631#include "moc_qfontdatabase.cpp"
T loadRelaxed() const noexcept
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
static QString translate(const char *context, const char *key, const char *disambiguation=nullptr, int n=-1)
\threadsafe
\inmodule QtCore \reentrant
void insertEngineData(const QFontDef &def, QFontEngineData *engineData)
QFontEngine * findEngine(const Key &key)
QFontEngineData * findEngineData(const QFontDef &def) const
static QFontCache * instance()
void insertEngine(const Key &key, QFontEngine *engine, bool insertMulti=false)
QList< ApplicationFont > applicationFonts
bool isApplicationFont(const QString &fileName)
static void parseFontName(const QString &name, QString &foundry, QString &family)
static void load(const QFontPrivate *d, int script)
static QFontDatabasePrivate * ensureFontDatabase()
static QFontDatabasePrivate * instance()
static QFontEngine * findFont(const QFontDef &request, int script, bool preferScriptOverFamily=false)
static QString resolveFontFamilyAlias(const QString &family)
QtFontFamily * family(const QString &f, FamilyRequestFlags flags=EnsurePopulated)
int addAppFont(const QByteArray &fontData, const QString &fileName)
static QList< int > standardSizes()
Returns a list of standard font sizes.
SystemFont
\value GeneralFont The default system font.
static int addApplicationFontFromData(const QByteArray &fontData)
static QString writingSystemName(WritingSystem writingSystem)
Returns the names the writingSystem (e.g.
static bool bold(const QString &family, const QString &style)
Returns true if the font that has family family and style style is bold; otherwise returns false.
WritingSystem
\value Any \value Latin \value Greek \value Cyrillic \value Armenian \value Hebrew \value Arabic \val...
static bool isSmoothlyScalable(const QString &family, const QString &style=QString())
Returns true if the font that has family family and style style is smoothly scalable; otherwise retur...
static int addApplicationFont(const QString &fileName)
static bool isPrivateFamily(const QString &family)
static QString styleString(const QFont &font)
Returns a string that describes the style of the font.
static bool italic(const QString &family, const QString &style)
Returns true if the font that has family family and style style is italic; otherwise returns false.
static QFont font(const QString &family, const QString &style, int pointSize)
Returns a QFont object that has family family, style style and point size pointSize.
static QString writingSystemSample(WritingSystem writingSystem)
Returns a string with sample characters from writingSystem.
static bool removeApplicationFont(int id)
static bool isScalable(const QString &family, const QString &style=QString())
Returns true if the font that has family family and style style is scalable; otherwise returns false.
static QStringList families(WritingSystem writingSystem=Any)
Returns a sorted list of the available font families which support the writingSystem.
static bool isBitmapScalable(const QString &family, const QString &style=QString())
Returns true if the font that has family family and style style is a scalable bitmap font; otherwise ...
static bool hasFamily(const QString &family)
static QList< int > smoothSizes(const QString &family, const QString &style)
Returns the point sizes of a font that has family family and style styleName that will look attractiv...
static QList< WritingSystem > writingSystems()
Returns a sorted list of the available writing systems.
static QList< int > pointSizes(const QString &family, const QString &style=QString())
Returns a list of the point sizes available for the font that has family family and style styleName.
static QFont systemFont(SystemFont type)
static QStringList applicationFontFamilies(int id)
static QStringList styles(const QString &family)
Returns a list of the styles available for the font family family.
static bool removeAllApplicationFonts()
static bool isFixedPitch(const QString &family, const QString &style=QString())
Returns true if the font that has family family and style style is fixed pitch; otherwise returns fal...
static int weight(const QString &family, const QString &style)
Returns the weight of the font that has family family and style style.
void setFallbackFamiliesList(const QStringList &fallbackFamilies)
QString styleName() const
QFont::Style style() const
Returns the style value of the matched window system font.
int weight() const
Returns the weight of the matched window system font.
static QStringList substitutes(const QString &)
Returns a list of family names to be used whenever familyName is specified.
StyleHint
Style hints are used by the \l{QFont}{font matching} algorithm to find an appropriate default family ...
void setStyle(Style style)
Sets the style of the font to style.
QString styleName() const
QStringList families() const
Weight weight() const
Returns the weight of the font, using the same scale as the \l{QFont::Weight} enumeration.
Style style() const
Returns the style of the font.
Style
This enum describes the different styles of glyphs that are used to display text.
static QPlatformIntegration * platformIntegration()
static QPlatformTheme * platformTheme()
static QFont font()
Returns the default application font.
void push_back(parameter_type t)
void reserve(qsizetype size)
void append(parameter_type t)
const_iterator ConstIterator
iterator insert(const Key &key, const T &value)
QList< T > values() const
void unlock() noexcept
Unlocks this mutex locker.
constexpr QStringView mid(qsizetype pos, qsizetype n=-1) const noexcept
Returns the substring of length length starting at position start in this object.
\macro QT_RESTRICTED_CAST_FROM_ASCII
QByteArray toLatin1() const &
void clear()
Clears the contents of the string and makes it null.
qsizetype size() const
Returns the number of characters in this string.
QString mid(qsizetype position, qsizetype n=-1) const
Returns a string that contains n characters of this string, starting at the specified position index.
QString first(qsizetype n) const
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
int compare(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
QString toLower() const &
QChar * data()
Returns a pointer to the data stored in the QString.
bool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString left(qsizetype n) const
Returns a substring that contains the n leftmost characters of the 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.
QSet< QString >::iterator it
Combined button and popup list for selecting options.
Q_DECL_CONST_FUNCTION QT_POPCOUNT_CONSTEXPR uint qPopulationCount(quint32 v) noexcept
static const QCssKnownValue properties[NumProperties - 1]
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
int qRound(qfloat16 d) noexcept
QRecursiveMutex * qt_fontdatabase_mutex()
QStringList qt_fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script)
Q_GUI_EXPORT int qt_defaultDpiY()
static bool familySupportsWritingSystem(QtFontFamily *family, size_t writingSystem)
static bool equalsCaseInsensitive(const QString &a, const QString &b)
static void parseFontName(const QString &name, QString &foundry, QString &family)
bool qt_isFontFamilyPopulated(const QString &familyName)
void qt_registerFont(const QString &familyName, const QString &stylename, const QString &foundryname, int weight, QFont::Style style, int stretch, bool antialiased, bool scalable, int pixelSize, bool fixedPitch, const QSupportedWritingSystems &writingSystems, void *handle)
static QString styleStringHelper(int weight, QFont::Style style)
static const int scriptForWritingSystem[]
Q_GUI_EXPORT QStringList qt_sort_families_by_writing_system(QChar::Script script, const QStringList &families)
static int getFontWeight(const QString &weightString)
static bool matchFamilyName(const QString &familyName, QtFontFamily *f)
Q_GUI_EXPORT QFontDatabase::WritingSystem qt_writing_system_for_script(int script)
static void initFontDef(const QtFontDesc &desc, const QFontDef &request, QFontDef *fontDef, bool multi)
static QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script)
Q_GUI_EXPORT int qt_script_for_writing_system(QFontDatabase::WritingSystem writingSystem)
void qt_registerFontFamily(const QString &familyName)
void qt_registerAliasToFontFamily(const QString &familyName, const QString &alias)
QString qt_resolveFontFamilyAlias(const QString &alias)
static QStringList familyList(const QFontDef &req)
static QtFontStyle * bestStyle(QtFontFoundry *foundry, const QtFontStyle::Key &styleKey, const QString &styleName=QString())
QByteArray qt_fontdata_from_index(int)
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
void qt_cleanupFontDatabase()
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
constexpr T qAbs(const T &t)
static bool contains(const QJsonArray &haystack, unsigned needle)
GLboolean GLboolean GLboolean b
GLuint64 GLenum void * handle
GLint GLint GLint GLint GLint x
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei count
GLuint GLuint GLfloat weight
GLsizei GLsizei GLfloat distance
GLenum const void GLbitfield fontStyle
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLsizeiptr const void * fontData
GLuint GLsizei const GLuint const GLintptr const GLsizeiptr * sizes
GLfixed GLfixed GLint GLint order
static void add(QPainterPath &path, const QWingedEdge &list, int edge, QPathEdge::Traversal traversal)
#define Q_ASSERT_X(cond, x, msg)
#define qPrintable(string)
#define Q_AUTOTEST_EXPORT
#define Q_TRACE_POINT(provider, tracepoint,...)
static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)
#define QT_TRANSLATE_NOOP(scope, x)
unsigned long long quint64
QT_END_NAMESPACE typedef QT_PREPEND_NAMESPACE(quintptr) WId
Q_CHECK_PTR(a=new int[80])
std::uniform_real_distribution dist(1, 2.5)
[2]
QNetworkRequest request(url)
char * toString(const MyType &t)
[31]
QStringList fallBackFamilies
\inmodule QtCore \reentrant
bool contains(const AT &t) const noexcept
QtFontFoundry ** foundries
unsigned char writingSystems[QFontDatabase::WritingSystemsCount]
bool matchesFamilyName(const QString &familyName) const
QtFontFoundry * foundry(const QString &f, bool=false)
QtFontStyle * style(const QtFontStyle::Key &, const QString &=QString(), bool=false)
QtFontSize * pixelSize(unsigned short size, bool=false)