![]() |
Qt 6.x
The Qt SDK
|
#include "qfontdatabase.h"#include "qfontdatabase_p.h"#include "qloggingcategory.h"#include "qalgorithms.h"#include "qguiapplication.h"#include "qvarlengtharray.h"#include "qthread.h"#include "qmutex.h"#include "qfile.h"#include "qfileinfo.h"#include "qfontengine_p.h"#include <qpa/qplatformintegration.h>#include <QtGui/private/qguiapplication_p.h>#include <qpa/qplatformfontdatabase.h>#include <qpa/qplatformtheme.h>#include <QtCore/qcache.h>#include <QtCore/qmath.h>#include <stdlib.h>#include <algorithm>#include <qtgui_tracepoints_p.h>#include "moc_qfontdatabase.cpp"
Include dependency graph for qfontdatabase.cpp:Go to the source code of this file.
Classes | |
| struct | QtFontDesc |
Macros | |
| #define | SMOOTH_SCALABLE 0xffff |
Variables | |
| static const int | scriptForWritingSystem [] |
| #define SMOOTH_SCALABLE 0xffff |
Definition at line 40 of file qfontdatabase.cpp.
|
static |
Definition at line 827 of file qfontdatabase.cpp.
References QtFontFoundry::count, d, dist(), i, QString::isEmpty(), QtFontStyle::key, qAbs(), qCDebug, QtFontStyle::Key::stretch, QtFontStyle::Key::style, QtFontStyle::styleName, QFont::StyleNormal, QtFontFoundry::styles, and QtFontStyle::Key::weight.
Referenced by QFontDatabase::font().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 252 of file qfontdatabase.cpp.
References Qt::CaseInsensitive.
Referenced by QtFontFamily::matchesFamilyName().
Here is the caller graph for this function:
|
static |
Definition at line 662 of file qfontdatabase.cpp.
References contains(), db, QFontDatabasePrivate::ensureFontDatabase(), QPlatformFontDatabase::fallbacksForFamily(), QPlatformIntegration::fontDatabase(), i, j, and QGuiApplicationPrivate::platformIntegration().
Referenced by QFontDatabasePrivate::findFont(), and qt_fallbacksForFamily().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 502 of file qfontdatabase.cpp.
References QFontDef::families, i, and QFont::substitutes().
Referenced by QFontDatabasePrivate::load(), and splitIntoFamilies().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Tests if the given family family supports writing system writingSystem, including the special case for Han script mapping to several subsequent writing systems
Definition at line 400 of file qfontdatabase.cpp.
References QFontDatabase::Any, QFontDatabase::Japanese, Q_ASSERT, QFontDatabase::SimplifiedChinese, QtFontFamily::Supported, QtFontFamily::writingSystems, and QFontDatabase::WritingSystemsCount.
Referenced by QPlatformFontDatabase::fallbacksForFamily(), and qt_sort_families_by_writing_system().
Here is the caller graph for this function:
|
static |
Definition at line 56 of file qfontdatabase.cpp.
References QFont::Black, QFont::Bold, Qt::CaseInsensitive, contains(), QFont::DemiBold, QFont::ExtraBold, QFont::ExtraLight, QFont::Light, QFont::Medium, QStringView::mid(), QFont::Normal, s2, QFont::Thin, QString::toLower(), and QCoreApplication::translate().
Referenced by QtFontStyle::Key::Key().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 474 of file qfontdatabase.cpp.
References desc, QFontDef::families, QFontDef::fixedPitch, QPlatformIntegration::fontDatabase(), QPlatformFontDatabase::fontsAlwaysScalable(), QFontDef::ignorePitch, QFontDef::pixelSize, QGuiApplicationPrivate::platformIntegration(), QFontDef::pointSize, QFont::PreferMatch, request, QFontDef::style, QFontDef::styleHint, QFontDef::styleStrategy, and QFontDef::weight.
Referenced by QFontDatabasePrivate::findFont().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 1001 of file qfontdatabase.cpp.
References QString::isEmpty().
Referenced by qt_sort_families_by_writing_system().
Here is the call graph for this function:
Here is the caller graph for this function:This makes sense of the font family name:
if the family name contains a '[' and a ']', then we take the text between the square brackets as the foundry, and the text before the square brackets as the family (ie. "Arial [Monotype]")
Definition at line 430 of file qfontdatabase.cpp.
References QString::clear(), QString::data(), i, QString::left(), QString::mid(), and QString::size().
Referenced by QFontDatabase::bold(), QFontDatabasePrivate::findFont(), QFontDatabase::font(), QFontDatabase::hasFamily(), QFontDatabase::isBitmapScalable(), QFontDatabase::isFixedPitch(), QFontDatabase::isSmoothlyScalable(), QFontDatabase::italic(), QFontDatabasePrivate::parseFontName(), QFontDatabase::pointSizes(), QFontDatabase::smoothSizes(), QFontDatabase::styles(), QFontDatabase::weight(), and QFontDatabase::writingSystems().
Here is the call graph for this function:
Here is the caller graph for this function:| Q_TRACE_POINT | ( | qtgui | , |
| QFontDatabase_addApplicationFont | , | ||
| const QString & | fileName | ||
| ) |
| Q_TRACE_POINT | ( | qtgui | , |
| QFontDatabase_load | , | ||
| const QString & | family, | ||
| int | pointSize | ||
| ) |
| Q_TRACE_POINT | ( | qtgui | , |
| QFontDatabase_loadEngine | , | ||
| const QString & | families, | ||
| int | pointSize | ||
| ) |
| Q_TRACE_POINT | ( | qtgui | , |
| QFontDatabasePrivate_addAppFont | , | ||
| const QString & | fileName | ||
| ) |
| void qt_cleanupFontDatabase | ( | ) |
Definition at line 518 of file qfontdatabase.cpp.
References db, and QFontDatabasePrivate::instance().
Referenced by QGuiApplicationPrivate::~QGuiApplicationPrivate().
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:| Q_GUI_EXPORT QByteArray qt_fontdata_from_index | ( | int | index | ) |
Definition at line 2152 of file qfontdatabase.cpp.
References QFontDatabasePrivate::applicationFonts, and QFontDatabasePrivate::instance().
Referenced by QFreetypeFace::getFace().
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:| bool qt_isFontFamilyPopulated | ( | const QString & | familyName | ) |
Definition at line 609 of file qfontdatabase.cpp.
References d, QFontDatabasePrivate::instance(), and QFontDatabasePrivate::RequestFamily.
Referenced by QPlatformFontDatabase::isFamilyPopulated().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 580 of file qfontdatabase.cpp.
References Qt::CaseInsensitive, d, QFontDatabasePrivate::instance(), QString::isEmpty(), qCDebug, and QFontDatabasePrivate::RequestFamily.
Referenced by QPlatformFontDatabase::registerAliasToFontFamily().
Here is the call graph for this function:
Here is the caller graph for this function:| 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 | ||
| ) |
Definition at line 537 of file qfontdatabase.cpp.
References QtFontStyle::antialiased, d, QFontDatabasePrivate::EnsureCreated, QPlatformIntegration::fontDatabase(), i, QFontDatabasePrivate::instance(), QtFontSize::pixelSize, QtFontStyle::pixelSize(), QGuiApplicationPrivate::platformIntegration(), qCDebug, QPlatformFontDatabase::releaseHandle(), SMOOTH_SCALABLE, QtFontStyle::smoothScalable, QtFontStyle::Key::stretch, QtFontStyle::Key::style, QtFontFoundry::style(), QtFontFamily::Supported, QSupportedWritingSystems::supported(), QtFontStyle::Key::weight, and QFontDatabase::WritingSystemsCount.
Referenced by QPlatformFontDatabase::registerFont().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 572 of file qfontdatabase.cpp.
References QFontDatabasePrivate::EnsureCreated, QFontDatabasePrivate::family(), QFontDatabasePrivate::instance(), and qCDebug.
Referenced by QPlatformFontDatabase::registerFontFamily().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 598 of file qfontdatabase.cpp.
References d, i, QFontDatabasePrivate::instance(), and QString::isEmpty().
Referenced by QPlatformFontDatabase::resolveFontFamilyAlias().
Here is the call graph for this function:
Here is the caller graph for this function:| Q_GUI_EXPORT int qt_script_for_writing_system | ( | QFontDatabase::WritingSystem | writingSystem | ) |
Definition at line 388 of file qfontdatabase.cpp.
References scriptForWritingSystem.
Referenced by QRawFont::fromFont().
Here is the caller graph for this function:| Q_GUI_EXPORT QStringList qt_sort_families_by_writing_system | ( | QChar::Script | script, |
| const QStringList & | families | ||
| ) |
Definition at line 2595 of file qfontdatabase.cpp.
References QFontDatabase::Any, db, QtFontFamily::ensurePopulated(), familySupportsWritingSystem(), i, QMultiMap< Key, T >::insert(), QFontDatabasePrivate::instance(), matchFamilyName(), Q_UNLIKELY, qt_writing_system_for_script(), QMultiMap< Key, T >::values(), and QFontDatabase::WritingSystemsCount.
Referenced by QCoreTextFontDatabase::fallbacksForFamily().
Here is the call graph for this function:
Here is the caller graph for this function:| Q_GUI_EXPORT QFontDatabase::WritingSystem qt_writing_system_for_script | ( | int | script | ) |
Definition at line 414 of file qfontdatabase.cpp.
References scriptForWritingSystem, and QFontDatabase::WritingSystemsCount.
Referenced by QPlatformFontDatabase::fallbacksForFamily(), QWindowsDirectWriteFontDatabase::populateFamily(), and qt_sort_families_by_writing_system().
Here is the caller graph for this function:
|
static |
Definition at line 1099 of file qfontdatabase.cpp.
References QFont::Black, QFont::Bold, QFont::DemiBold, QFont::ExtraBold, QFont::ExtraLight, QFont::Light, QFont::Medium, QFont::Normal, QFont::StyleItalic, QFont::StyleOblique, QFont::Thin, and QCoreApplication::translate().
Referenced by QFontDatabase::isSmoothlyScalable(), QFontDatabase::styles(), QFontDatabase::styleString(), and QFontDatabase::styleString().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 349 of file qfontdatabase.cpp.
Referenced by qt_script_for_writing_system(), and qt_writing_system_for_script().