21#include <private/qfontengine_p.h>
22#include <private/qpainter_p.h>
23#include <private/qtextengine_p.h>
26#include <qpa/qplatformscreen.h>
27#include <qpa/qplatformintegration.h>
28#include <qpa/qplatformfontdatabase.h>
29#include <QtGui/private/qguiapplication_p.h>
31#include <QtCore/QMutexLocker>
32#include <QtCore/QMutex>
37#ifdef QFONTCACHE_DEBUG
38# define FC_DEBUG qDebug
40# define FC_DEBUG if (false) qDebug
45#ifndef QFONTCACHE_DECREASE_TRIGGER_LIMIT
46# define QFONTCACHE_DECREASE_TRIGGER_LIMIT 256
85 QString this_family, this_foundry, other_family, other_foundry;
89 if (this_family != other_family || this_foundry != other_foundry)
97 && this_family == other_family
101 || this_foundry == other_foundry)
145 static constexpr std::array<int, 2> legacyToOpenTypeMap[] = {
151 int closestDist = INT_MAX;
155 for (
auto mapping : legacyToOpenTypeMap) {
156 const int weightOld =
mapping[ inverted];
157 const int weightNew =
mapping[!inverted];
159 if (
dist < closestDist) {
178 const int numFamilies =
list.
size();
180 for (
int i = 0;
i < numFamilies; ++
i) {
206 capital(0), letterSpacingIsAbsolute(
false), scFont(
nullptr)
212 underline(
other.underline), overline(
other.overline),
214 capital(
other.capital), letterSpacingIsAbsolute(
other.letterSpacingIsAbsolute),
215 letterSpacing(
other.letterSpacing), wordSpacing(
other.wordSpacing),
216 features(
other.features), scFont(
other.scFont)
236#define QT_FONT_ENGINE_FROM_DATA(data, script) data->engines[script]
601 : resolve_mask(
font.resolve_mask)
617 :
d(
data), resolve_mask(
QFont::AllPropertiesResolved)
778 resolve_mask =
font.resolve_mask;
973 qWarning(
"QFont::setPointSize: Point size <= 0 (%d), must be greater than 0",
pointSize);
998 qWarning(
"QFont::setPointSizeF: Point size <= 0 (%f), must be greater than 0",
pointSize);
1142#if QT_DEPRECATED_SINCE(6, 0)
1158void QFont::setLegacyWeight(
int legacyWeight)
1176int QFont::legacyWeight()
const
1193 if (weightValue !=
static_cast<int>(
weight)) {
1194 qWarning() <<
"QFont::setWeight: Weight must be between 1 and 1000, attempted to set "
1195 <<
static_cast<int>(
weight);
1567 if (factor < 0 || factor > 4000) {
1568 qWarning(
"QFont::setStretch: Parameter '%d' out of range", factor);
1778 if (
f.d == d)
return false;
1782 if (
r1.pointSize !=
r2.pointSize)
return r1.pointSize <
r2.pointSize;
1783 if (
r1.pixelSize !=
r2.pixelSize)
return r1.pixelSize <
r2.pixelSize;
1784 if (
r1.weight !=
r2.weight)
return r1.weight <
r2.weight;
1785 if (
r1.style !=
r2.style)
return r1.style <
r2.style;
1786 if (
r1.stretch !=
r2.stretch)
return r1.stretch <
r2.stretch;
1787 if (
r1.styleHint !=
r2.styleHint)
return r1.styleHint <
r2.styleHint;
1788 if (
r1.styleStrategy !=
r2.styleStrategy)
return r1.styleStrategy <
r2.styleStrategy;
1789 if (
r1.families !=
r2.families)
return r1.families <
r2.families;
1796 int f1attrs = (
f.d->underline << 3) + (
f.d->overline << 2) + (
f.d->strikeOut<<1) +
f.d->kerning;
1798 if (f1attrs != f2attrs)
return f1attrs < f2attrs;
1804 auto jt =
f.d->features.constBegin();
1806 if (
it.key() != jt.key())
1807 return jt.key() <
it.key();
1808 if (
it.value() != jt.value())
1809 return jt.value() <
it.value();
1856 if (resolve_mask == 0 || (resolve_mask ==
other.resolve_mask && *
this ==
other)) {
1858 o.resolve_mask = resolve_mask;
1903 if (
it != fontSubst->
constEnd() && !(*it).isEmpty())
1904 return (*it).first();
1937 const QString &substituteName)
1964 for (
const QString &substituteName : substituteNames) {
1999#ifndef QT_NO_DATASTREAM
2008 if (
f->request.style)
2016 if (
f->request.fixedPitch)
2033 if (
f->request.ignorePitch)
2035 if (
f->letterSpacingIsAbsolute)
2048 f->underline = (
bits & 0x02) != 0;
2049 f->overline = (
bits & 0x40) != 0;
2050 f->strikeOut = (
bits & 0x04) != 0;
2051 f->request.fixedPitch = (
bits & 0x08) != 0;
2054 f->kerning = (
bits & 0x10) != 0;
2055 if ((
bits & 0x80) != 0)
2062 f->request.ignorePitch = (
bits & 0x01) != 0;
2063 f->letterSpacingIsAbsolute = (
bits & 0x02) != 0;
2106 const QChar comma(u
',');
2128 return fontDescription;
2154 const auto l = sr.
split(u
',');
2157 l.first().isEmpty()) {
2158 qWarning(
"QFont::fromString: Invalid description '%s'",
2173 }
else if (
count >= 10) {
2174 if (l[2].
toInt() > 0)
2412 { char((
tag & 0xff000000) >> 24),
2413 char((
tag & 0x00ff0000) >> 16),
2414 char((
tag & 0x0000ff00) >> 8),
2415 char((
tag & 0x000000ff)) };
2454 if (!fallbacks.isEmpty())
2455 return fallbacks.first();
2504#ifndef QT_NO_DATASTREAM
2516 if (
s.version() == 1) {
2530 }
else if (
s.version() <= 3) {
2532 if (pointSize < 0) {
2597 if (
s.version() == 1) {
2618 qint16 pointSize, pixelSize = -1;
2620 if (
s.version() >= 4)
2630 quint8 tempStyleStrategy;
2631 s >> tempStyleStrategy;
2632 styleStrategy = tempStyleStrategy;
2827 return engine->fontDef.styleName;
2851 return engine->fontDef.pointSize;
2863 return engine->fontDef.pixelSize;
2891#if QT_DEPRECATED_SINCE(6, 0)
2905int QFontInfo::legacyWeight()
const
2921 return engine->fontDef.weight;
2987 if (!
engine->fontDef.fixedPitchComputed) {
2991 if (!
engine->stringToCMap(
ch, 2, &
g, &l, {}))
2994 engine->fontDef.fixedPitch =
g.advances[0] ==
g.advances[1];
2995 engine->fontDef.fixedPitchComputed =
true;
2998 return engine->fontDef.fixedPitch;
3035using namespace std::chrono_literals;
3037#ifdef QFONTCACHE_DEBUG
3046#ifndef QFONTCACHE_MIN_COST
3047# define QFONTCACHE_MIN_COST 4*1024
3054 QFontCache *&fontCache = theFontCache()->localData();
3064 cache = theFontCache();
3065 }
QT_CATCH (
const std::bad_alloc &) {
3069 cache->setLocalData(
nullptr);
3075 :
QObject(), total_cost(0), max_cost(min_cost),
3076 current_timestamp(0), fast(
false),
3097 if (
data->engines[
i]) {
3098 if (!
data->engines[
i]->ref.deref()) {
3100 delete data->engines[
i];
3102 data->engines[
i] =
nullptr;
3105 if (!
data->ref.deref()) {
3108 FC_DEBUG(
"QFontCache::clear: engineData %p still has refcount %d",
3118 bool mightHaveEnginesLeftForCleanup;
3120 mightHaveEnginesLeftForCleanup =
false;
3127 if (!
engine->ref.deref()) {
3131 }
else if (cacheCount == 0) {
3132 FC_DEBUG(
"QFontCache::clear: engine %p still has refcount %d",
3135 it.value().data =
nullptr;
3138 }
while (mightHaveEnginesLeftForCleanup);
3145 max_cost = min_cost;
3161#ifdef QFONTCACHE_DEBUG
3162 FC_DEBUG(
"QFontCache: inserting new engine data %p", engineData);
3164 FC_DEBUG(
" QFontCache already contains engine data %p for key=(%g %g %d %d %d)",
3184 if (
it ==
end)
return nullptr;
3192 return it.value().data;
3198 value.timestamp = ++current_timestamp;
3200 FC_DEBUG(
"QFontCache: found font engine\n"
3201 " %p: timestamp %4u hits %3u ref %2d/%2d, type %d",
3204 value.data->type());
3212#ifdef QFONTCACHE_DEBUG
3213 FC_DEBUG(
"QFontCache: inserting new engine %p, refcount %d",
engine,
engine->ref.loadRelaxed());
3215 FC_DEBUG(
" QFontCache already contains engine %p for key=(%g %g %d %d %d)",
3217 key.def.pixelSize,
key.def.weight,
key.def.style,
key.def.fixedPitch);
3226 data.timestamp = ++current_timestamp;
3234 increaseCost(
engine->cache_cost);
3237void QFontCache::increaseCost(
uint cost)
3243 FC_DEBUG(
" COST: increased %u kb, total_cost %u kb, max_cost %u kb",
3244 cost, total_cost, max_cost);
3246 if (total_cost > max_cost) {
3247 max_cost = total_cost;
3252 if (timer_id == -1 || ! fast) {
3263void QFontCache::decreaseCost(
uint cost)
3270 FC_DEBUG(
" COST: decreased %u kb, total_cost %u kb, max_cost %u kb",
3271 cost, total_cost, max_cost);
3276 FC_DEBUG(
"QFontCache::timerEvent: performing cache maintenance (timestamp %u)",
3279 if (total_cost <= max_cost && max_cost <= min_cost) {
3280 FC_DEBUG(
" cache redused sufficiently, stopping timer");
3291void QFontCache::decreaseCache()
3294 uint in_use_cost = 0;
3300 const uint engine_data_cost =
3306 FC_DEBUG(
" %p: ref %2d",
it.value(),
int(
it.value()->ref.loadRelaxed()));
3308 if (
it.value()->ref.loadRelaxed() != 1)
3309 in_use_cost += engine_data_cost;
3319 FC_DEBUG(
" %p: timestamp %4u hits %2u ref %2d/%2d, cost %u bytes",
3320 it.value().data,
it.value().timestamp,
it.value().hits,
3322 it.value().data->cache_cost);
3332 in_use_cost = (in_use_cost + 512) / 1024;
3342 uint new_max_cost =
qMax(
qMax(max_cost / 2, in_use_cost), min_cost);
3344 FC_DEBUG(
" after sweep, in use %u kb, total %u kb, max %u kb, new max %u kb",
3345 in_use_cost, total_cost, max_cost, new_max_cost);
3348 if (new_max_cost == max_cost) {
3350 FC_DEBUG(
" cannot shrink cache, slowing timer");
3352 if (timer_id != -1) {
3359 }
else if (! fast) {
3360 FC_DEBUG(
" dropping into passing gear");
3369 max_cost = new_max_cost;
3377 if (
it.value()->ref.loadRelaxed() == 1) {
3380 it.value()->ref.deref();
3392 bool cost_decreased;
3394 cost_decreased =
false;
3400 uint least_popular = ~0u;
3408 if (
it.value().timestamp < oldest &&
it.value().hits <= least_popular) {
3409 oldest =
it.value().timestamp;
3410 least_popular =
it.value().hits;
3417 FC_DEBUG(
" %p: timestamp %4u hits %2u ref %2d/%2d, type %d",
3418 it.value().data,
it.value().timestamp,
it.value().hits,
3420 it.value().data->type());
3426 if (
it.value().data == fontEngine) {
3439 cost_decreased =
true;
3441 }
while (cost_decreased && total_cost > max_cost);
3445#ifndef QT_NO_DEBUG_STREAM
3449 stream.nospace().noquote();
3452 if (
stream.verbosity() == QDebug::DefaultVerbosity) {
3464 const bool resolved = (
font.resolve_mask &
property) != 0;
3465 if (!resolved &&
stream.verbosity() == QDebug::MinimumVerbosity)
3468 #define QFONT_DEBUG_SKIP_DEFAULT(prop) \
3469 if ((font.prop() == defaultFont.prop()) && stream.verbosity() == 1) \
3530 #undef QFONT_DEBUG_SKIP_DEFAULT
3535 if (
stream.verbosity() > QDebug::MinimumVerbosity)
3538 fontDescription.
chop(2);
3540 stream << fontDescription <<
')';
3548#include "moc_qfont.cpp"
T loadRelaxed() const noexcept
char * data()
\macro QT_NO_CAST_FROM_BYTEARRAY
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
\inmodule QtCore\reentrant
void detach()
If the shared data object's reference count is greater than 1, this function creates a deep copy of t...
T * data() const noexcept
Returns a pointer to the shared data object.
void insertEngineData(const QFontDef &def, QFontEngineData *engineData)
EngineDataCache engineDataCache
QFontEngine * findEngine(const Key &key)
QFontEngineData * findEngineData(const QFontDef &def) const
void timerEvent(QTimerEvent *event) override
This event handler can be reimplemented in a subclass to receive timer events for the object.
static QFontCache * instance()
void updateHitCountAndTimeStamp(Engine &value)
void insertEngine(const Key &key, QFontEngine *engine, bool insertMulti=false)
QHash< QFontEngine *, int > engineCacheCount
static void parseFontName(const QString &name, QString &foundry, QString &family)
static void load(const QFontPrivate *d, int script)
QFontEngine * engines[QChar::ScriptCount]
qreal pointSizeF() const
Returns the point size of the matched window system font.
int pointSize() const
Returns the point size of the matched window system font.
int pixelSize() const
Returns the pixel size of the matched window system font.
QString family() const
Returns the family name of the matched window system font.
bool italic() const
Returns the italic value of the matched window system font.
QFontInfo & operator=(const QFontInfo &)
Assigns the font info in fi.
QString styleName() const
bool fixedPitch() const
Returns the fixed pitch value of the matched window system font.
QFontInfo(const QFont &)
Constructs a font info object for font.
QFont::StyleHint styleHint() const
Returns the style of the matched window system font.
bool strikeOut() const
Returns the strikeout value of the matched window system font.
bool overline() const
Returns the overline value of the matched window system font.
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.
~QFontInfo()
Destroys the font info object.
bool exactMatch() const
Returns true if the matched window system font is exactly the same as the one specified by the font; ...
bool underline() const
Returns the underline value of the matched window system font.
bool letterSpacingIsAbsolute
static QFontPrivate * get(const QFont &font)
QHash< quint32, quint32 > features
QFontPrivate * smallCapsFontPrivate() const
void setFeature(quint32 tag, quint32 value)
QFontEngine * engineForScript(int script) const
void resolve(uint mask, const QFontPrivate *other)
void unsetFeature(quint32 tag)
QFontEngineData * engineData
void alterCharForCapitalization(QChar &c) const
static void detachButKeepEngineData(QFont *font)
static QStringList substitutes(const QString &)
Returns a list of family names to be used whenever familyName is specified.
static QByteArray tagToString(quint32 tag)
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 family() const
Returns the requested font family name.
StyleStrategy styleStrategy() const
Returns the StyleStrategy.
void setPointSize(int)
Sets the point size to pointSize.
static void cacheStatistics()
void setOverline(bool)
If enable is true, sets overline on; otherwise sets overline off.
QString styleName() const
void setStrikeOut(bool)
If enable is true, sets strikeout on; otherwise sets strikeout off.
QList< quint32 > featureTags() const
bool isCopyOf(const QFont &) const
Returns true if this font and f are copies of each other, i.e.
int pixelSize() const
Returns the pixel size of the font if it was set with setPixelSize().
bool italic() const
Returns true if the style() of the font is not QFont::StyleNormal.
QFont()
Constructs a font object that uses the application's default font.
friend class QFontPrivate
StyleHint styleHint() const
Returns the StyleHint.
bool fromString(const QString &)
Sets this font to match the description descrip.
bool strikeOut() const
Returns true if strikeout has been set; otherwise returns false.
size_t qHash(const QFont &font, size_t seed) noexcept
Returns the hash value for font.
bool underline() const
Returns true if underline has been set; otherwise returns false.
void setFamilies(const QStringList &)
bool operator!=(const QFont &) const
Returns true if this font is different from f; otherwise returns false.
void setCapitalization(Capitalization)
QString toString() const
Returns a description of the font.
qreal letterSpacing() const
bool isFeatureSet(quint32 tag) const
void setWordSpacing(qreal spacing)
void setFixedPitch(bool)
If enable is true, sets fixed pitch on; otherwise sets fixed pitch off.
void setFamily(const QString &)
Sets the family name of the font.
void setStyleStrategy(StyleStrategy s)
Sets the style strategy for the font to s.
bool exactMatch() const
Returns true if a window system font exactly matching the settings of this font is available.
QFont resolve(const QFont &) const
Returns a new QFont that has attributes copied from other that have not been previously set on this f...
static void insertSubstitution(const QString &, const QString &)
Inserts substituteName into the substitution table for the family familyName.
HintingPreference hintingPreference() const
bool operator<(const QFont &) const
Provides an arbitrary comparison of this font and font f.
Capitalization capitalization() const
static void removeSubstitutions(const QString &)
Removes all the substitutions for familyName.
QStringList families() const
Weight weight() const
Returns the weight of the font, using the same scale as the \l{QFont::Weight} enumeration.
@ HintingPreferenceResolved
void setLetterSpacing(SpacingType type, qreal spacing)
qreal wordSpacing() const
int pointSize() const
Returns the point size of the font.
void setKerning(bool)
Enables kerning for this font if enable is true; otherwise disables it.
int stretch() const
Returns the stretch factor for the font.
static QStringList substitutions()
Returns a sorted list of substituted family names.
bool kerning() const
Returns true if kerning should be used when drawing text with this font.
QString defaultFamily() const
Returns the family name that corresponds to the current style hint.
QString key() const
Returns the font's key, a textual representation of a font.
void setPixelSize(int)
Sets the font size to pixelSize pixels, with a maxiumum size of an unsigned 16-bit integer.
bool operator==(const QFont &) const
Returns true if this font is equal to f; otherwise returns false.
void setHintingPreference(HintingPreference hintingPreference)
void setItalic(bool b)
Sets the style() of the font to QFont::StyleItalic if enable is true; otherwise the style is set to Q...
bool fixedPitch() const
Returns true if fixed pitch has been set; otherwise returns false.
void setUnderline(bool)
If enable is true, sets underline on; otherwise sets underline off.
void setStyleHint(StyleHint, StyleStrategy=PreferDefault)
Sets the style hint and strategy to hint and strategy, respectively.
QFont & operator=(const QFont &)
Move-assigns other to this QFont instance.
qreal pointSizeF() const
Returns the point size of the font.
void setStyleName(const QString &)
void setStretch(int)
Sets the stretch factor for the font.
SpacingType letterSpacingType() const
quint32 featureValue(quint32 tag) const
Stretch
Predefined stretch values that follow the CSS naming convention.
Style style() const
Returns the style of the font.
void setFeature(const char *feature, quint32 value)
StyleStrategy
The style strategy tells the \l{QFont}{font matching} algorithm what type of fonts should be used to ...
void setPointSizeF(qreal)
Sets the point size to pointSize.
static quint32 stringToTag(const char *tagString)
Weight
Qt uses a weighting scale from 1 to 1000 compatible with OpenType.
void unsetFeature(quint32 tag)
void setWeight(Weight weight)
Sets the weight of the font to weight, using the scale defined by \l QFont::Weight enumeration.
bool overline() const
Returns true if overline has been set; otherwise returns false.
~QFont()
Destroys the font object and frees all allocated resources.
Style
This enum describes the different styles of glyphs that are used to display text.
static void insertSubstitutions(const QString &, const QStringList &)
Inserts the list of families substituteNames into the substitution list for familyName.
QScreen * primaryScreen
the primary (or default) screen of the application.
bool remove(const Key &key)
Removes the item that has the key from the hash.
qsizetype size() const noexcept
Returns the number of items in the hash.
const_iterator constFind(const Key &key) const noexcept
const_iterator constEnd() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the ...
const_iterator constBegin() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
QList< Key > keys() const
Returns a list containing all the keys in the hash, in an arbitrary order.
bool contains(const Key &key) const noexcept
Returns true if the hash contains an item with the key; otherwise returns false.
T value(const Key &key) const noexcept
const_iterator ConstIterator
Qt-style synonym for QHash::const_iterator.
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
Removes all items from the hash and frees up all memory used by it.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
qsizetype size() const noexcept
const_reference at(qsizetype i) const noexcept
void append(parameter_type t)
iterator insert(const Key &key, const T &value)
T value(const Key &key, const T &defaultValue=T()) const
iterator erase(const_iterator it)
bool contains(const Key &key) const
const_iterator constFind(const Key &key) const
const_iterator ConstIterator
const_iterator constBegin() const
const_iterator constEnd() const
iterator replace(const Key &key, const T &value)
const_iterator constEnd() const
bool contains(const Key &key) const
const_iterator ConstIterator
iterator find(const Key &key)
iterator insert(const Key &key, const T &value)
iterator erase(const_iterator it)
const_iterator constBegin() const
T value(const Key &key, const T &defaultValue=T()) const
int startTimer(int interval, Qt::TimerType timerType=Qt::CoarseTimer)
This is an overloaded function that will start a timer of type timerType and a timeout of interval mi...
void killTimer(int id)
Kills the timer with timer identifier, id.
The QScreen class is used to query screen properties. \inmodule QtGui.
qreal logicalDotsPerInchY
the number of logical dots or pixels per inch in the vertical direction
qreal logicalDotsPerInchX
the number of logical dots or pixels per inch in the horizontal direction
Q_CORE_EXPORT QList< QStringView > split(QStringView sep, Qt::SplitBehavior behavior=Qt::KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Splits the view into substring views wherever sep occurs, and returns the list of those string views.
QStringView trimmed() const noexcept
Strips leading and trailing whitespace and returns the result.
\macro QT_RESTRICTED_CAST_FROM_ASCII
QByteArray toLatin1() const &
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
void chop(qsizetype n)
Removes n characters from the end of the string.
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QStringList split(const QString &sep, Qt::SplitBehavior behavior=Qt::KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Splits the string into substrings wherever sep occurs, and returns the list of those strings.
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.
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QString toLower() const &
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
QCache< int, Employee > cache
[0]
QSet< QString >::iterator it
Combined button and popup list for selecting options.
#define Q_BASIC_ATOMIC_INITIALIZER(a)
size_t qstrlen(const char *str)
AudioChannelLayoutTag tag
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
size_t qHash(const QFileSystemWatcherPathKey &key, size_t seed=0)
int qRound(qfloat16 d) noexcept
Q_GUI_EXPORT int qt_openTypeToLegacyWeight(int weight)
static void set_font_bits(int version, quint8 bits, QFontPrivate *f)
QRecursiveMutex * qt_fontdatabase_mutex()
static int convertWeights(int weight, bool inverted)
Q_GUI_EXPORT int qt_defaultDpiX()
static QStringList splitIntoFamilies(const QString &family)
Q_GUI_EXPORT int qt_legacyToOpenTypeWeight(int weight)
Q_GUI_EXPORT int qt_defaultDpi()
static constexpr auto slow_timeout
QStringList qt_fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script)
static constexpr auto fast_timeout
#define QFONT_DEBUG_SKIP_DEFAULT(prop)
#define QFONTCACHE_MIN_COST
#define QT_FONT_ENGINE_FROM_DATA(data, script)
Q_GUI_EXPORT int qt_defaultDpiY()
static quint8 get_extended_font_bits(const QFontPrivate *f)
QDebug operator<<(QDebug stream, const QFont &font)
static Q_CONSTINIT QBasicAtomicInt font_cache_id
#define QFONTCACHE_DECREASE_TRIGGER_LIMIT
QHash< QString, QStringList > QFontSubst
static quint8 get_font_bits(int version, const QFontPrivate *f)
static void set_extended_font_bits(quint8 bits, QFontPrivate *f)
static QStringList familyList(const QFontDef &req)
static QFixed kerning(int left, int right, const QFontEngine::KernPair *pairs, int numPairs)
#define MAKE_TAG(ch1, ch2, ch3, ch4)
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
constexpr const T & qBound(const T &min, const T &val, const T &max)
constexpr const T & qMax(const T &a, const T &b)
constexpr T qAbs(const T &t)
GLenum GLenum GLsizei count
GLuint GLuint GLfloat weight
GLenum const void GLbitfield fontStyle
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const void * bits
GLenum GLenum GLenum GLenum mapping
static qsizetype cost(const QPixmap &pixmap)
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
static int toInt(const QChar &qc, int R)
static double toDouble(Value v)
std::uniform_real_distribution dist(1, 2.5)
[2]
QFileInfo fi("c:/temp/foo")
[newstuff]
QNetworkRequest request(url)
static constexpr QFixed fromReal(qreal r)
constexpr int value() const
constexpr qreal toReal() const
bool exactMatch(const QFontDef &other) const
bool contains(const AT &t) const noexcept