![]() |
Qt 6.x
The Qt SDK
|
#include "qfont.h"#include "qdebug.h"#include "qpaintdevice.h"#include "qfontdatabase.h"#include "qfontmetrics.h"#include "qfontinfo.h"#include "qpainter.h"#include "qhash.h"#include "qdatastream.h"#include "qguiapplication.h"#include "qstringlist.h"#include "qscreen.h"#include "qthread.h"#include "qthreadstorage.h"#include "qfont_p.h"#include <private/qfontengine_p.h>#include <private/qpainter_p.h>#include <private/qtextengine_p.h>#include <limits.h>#include <qpa/qplatformscreen.h>#include <qpa/qplatformintegration.h>#include <qpa/qplatformfontdatabase.h>#include <QtGui/private/qguiapplication_p.h>#include <QtCore/QMutexLocker>#include <QtCore/QMutex>#include <array>#include "moc_qfont.cpp"
Include dependency graph for qfont.cpp:Go to the source code of this file.
Macros | |
| #define | FC_DEBUG if (false) qDebug |
| #define | QFONTCACHE_DECREASE_TRIGGER_LIMIT 256 |
| #define | QT_FONT_ENGINE_FROM_DATA(data, script) data->engines[script] |
| #define | QFONTCACHE_MIN_COST 4*1024 |
| #define | QFONT_DEBUG_SKIP_DEFAULT(prop) |
Typedefs | |
| typedef QHash< QString, QStringList > | QFontSubst |
Functions | |
| Q_GUI_EXPORT int | qt_defaultDpiX () |
| Q_GUI_EXPORT int | qt_defaultDpiY () |
| Q_GUI_EXPORT int | qt_defaultDpi () |
| static int | convertWeights (int weight, bool inverted) |
| static QStringList | splitIntoFamilies (const QString &family) |
| Q_GUI_EXPORT int | qt_legacyToOpenTypeWeight (int weight) |
| Q_GUI_EXPORT int | qt_openTypeToLegacyWeight (int weight) |
| QRecursiveMutex * | qt_fontdatabase_mutex () |
| static quint8 | get_font_bits (int version, const QFontPrivate *f) |
| static quint8 | get_extended_font_bits (const QFontPrivate *f) |
| static void | set_font_bits (int version, quint8 bits, QFontPrivate *f) |
| static void | set_extended_font_bits (quint8 bits, QFontPrivate *f) |
| QStringList | qt_fallbacksForFamily (const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) |
| QDebug | operator<< (QDebug stream, const QFont &font) |
Variables | |
| bool | qt_is_tty_app |
| static constexpr auto | fast_timeout = 10s |
| static constexpr auto | slow_timeout = 5min |
| static Q_CONSTINIT QBasicAtomicInt | font_cache_id = Q_BASIC_ATOMIC_INITIALIZER(0) |
| #define QFONT_DEBUG_SKIP_DEFAULT | ( | prop | ) |
| typedef QHash<QString, QStringList> QFontSubst |
|
static |
Definition at line 143 of file qfont.cpp.
References QFont::Black, QFont::Bold, QFont::DemiBold, dist(), QFont::ExtraBold, QFont::ExtraLight, QFont::Light, QFont::Medium, QFont::Normal, qAbs(), and QFont::Thin.
Referenced by qt_legacyToOpenTypeWeight(), and qt_openTypeToLegacyWeight().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
Definition at line 2004 of file qfont.cpp.
References Q_ASSERT, QDataStream::Qt_4_0, and QFont::StyleOblique.
Definition at line 3446 of file qfont.cpp.
References other(), QFontDef::pixelSize, QFontDef::pointSize, and QFontPrivate::request.
Here is the call graph for this function:| Q_GUI_EXPORT int qt_defaultDpi | ( | ) |
Definition at line 137 of file qfont.cpp.
References qt_defaultDpiY().
Referenced by QFontMetrics::QFontMetrics(), QFontMetricsF::QFontMetricsF(), QPdfPrintEnginePrivate::QPdfPrintEnginePrivate(), QTextDocumentLayoutPrivate::blockIndent(), QCoreTextRawFontEngine::cloneWithSize(), QCoreTextFontEngine::cloneWithSize(), QCoreTextFontEngine::create(), QPicturePaintEngine::drawTextItem(), getSize(), QMacPrintEnginePrivate::initialize(), QTextDocumentLayoutPrivate::layoutBlock(), QQuickFontValueType::pixelSize(), QQuickFontValueType::pointSize(), QTextDocumentLayoutPrivate::scaleToDevice(), QTextDocumentLayoutPrivate::scaleToDevice(), and QQuickStyledTextPrivate::setFontSize().
Here is the call graph for this function:
Here is the caller graph for this function:| Q_GUI_EXPORT int qt_defaultDpiX | ( | ) |
Definition at line 107 of file qfont.cpp.
References Qt::AA_Use96Dpi, QCoreApplication::instance(), QScreen::logicalDotsPerInchX, QGuiApplication::primaryScreen, qRound(), qt_is_tty_app, and screen.
Referenced by QFakeDevice::QFakeDevice(), QStyleHelper::dpi(), QAlphaPaintEngine::flushAndInit(), QPicture::metric(), QBlittablePlatformPixmap::metric(), QRasterPlatformPixmap::metric(), QOpenGLWidget::metric(), QTextDocument::print(), and QQuickLayoutStyleInfo::spacing().
Here is the call graph for this function:
Here is the caller graph for this function:| Q_GUI_EXPORT int qt_defaultDpiY | ( | ) |
Definition at line 122 of file qfont.cpp.
References Qt::AA_Use96Dpi, QCoreApplication::instance(), QScreen::logicalDotsPerInchY, QGuiApplication::primaryScreen, qRound(), qt_is_tty_app, and screen.
Referenced by QFakeDevice::QFakeDevice(), QTextEngine::calculateTabWidth(), QAlphaPaintEngine::flushAndInit(), QPicture::metric(), QBlittablePlatformPixmap::metric(), QRasterPlatformPixmap::metric(), QOpenGLWidget::metric(), QFontDatabase::pointSizes(), QTextDocument::print(), qt_defaultDpi(), and QFontDatabase::smoothSizes().
Here is the call graph for this function:
Here is the caller graph for this function:| QStringList qt_fallbacksForFamily | ( | const QString & | family, |
| QFont::Style | style, | ||
| QFont::StyleHint | styleHint, | ||
| QChar::Script | script | ||
| ) |
Definition at line 695 of file qfontdatabase.cpp.
References fallbacksForFamily().
Referenced by QFont::defaultFamily(), and QFontEngineMulti::ensureFallbackFamiliesQueried().
Here is the call graph for this function:
Here is the caller graph for this function:| QRecursiveMutex * qt_fontdatabase_mutex | ( | ) |
Definition at line 526 of file qfontdatabase.cpp.
Referenced by QFontPrivate::engineForScript().
Here is the caller graph for this function:| Q_GUI_EXPORT int qt_legacyToOpenTypeWeight | ( | int | weight | ) |
Definition at line 192 of file qfont.cpp.
References convertWeights().
Referenced by QFont::fromString().
Here is the call graph for this function:
Here is the caller graph for this function:| Q_GUI_EXPORT int qt_openTypeToLegacyWeight | ( | int | weight | ) |
Definition at line 198 of file qfont.cpp.
References convertWeights().
Here is the call graph for this function:
|
static |
|
static |
Definition at line 2044 of file qfont.cpp.
References Q_ASSERT, QDataStream::Qt_4_0, QFont::StyleItalic, QFont::StyleNormal, and QFont::StyleOblique.
|
static |
Definition at line 172 of file qfont.cpp.
References QList< T >::at(), QString::endsWith(), familyList(), i, QString::isEmpty(), list, QString::mid(), QString::size(), QList< T >::size(), QString::split(), QString::startsWith(), and str.
Referenced by QFont::QFont().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
extern |
Definition at line 120 of file qguiapplication.cpp.
Referenced by qt_defaultDpiX(), and qt_defaultDpiY().