#include "qlibraryinfo.h"
#include <QtCore/qsettings.h>
#include "qfontengine_qpa_p.h"
#include "qplatformdefs.h"
#include <QtGui/private/qapplication_p.h>
#include <QtGui/qplatformfontdatabase_qpa.h>
#include <QtCore/qmath.h>
Go to the source code of this file.
|
static QStringList | fallbackFamilies (const QString &family, const QFont::Style &style, const QFont::StyleHint &styleHint, const QUnicodeTables::Script &script) |
|
static void | initializeDb () |
|
static void | load (const QString &=QString(), int=-1) |
|
static QFontEngine * | loadEngine (int script, const QFontDef &request, QtFontFamily *family, QtFontFoundry *foundry, QtFontStyle *style, QtFontSize *size) |
|
static QFontEngine * | loadSingleEngine (int script, const QFontDef &request, QtFontFoundry *foundry, QtFontStyle *style, QtFontSize *size) |
|
void | qt_applyFontDatabaseSettings (const QSettings &settings) |
|
Q_GUI_EXPORT void | qt_registerFont (const QString &familyName, const QString &foundryname, int weight, QFont::Style style, int stretch, bool antialiased, bool scalable, int pixelSize, const QSupportedWritingSystems &writingSystems, void *handle) |
|
static void | registerFont (QFontDatabasePrivate::ApplicationFont *fnt) |
|
◆ fallbackFamilies()
Definition at line 83 of file qfontdatabase_qpa.cpp.
Referenced by QFontconfigDatabase::fallbacksForFamily(), QFontDatabase::findFont(), and loadEngine().
85 QStringList retList = QApplicationPrivate::platformIntegration()->fontDatabase()->fallbacksForFamily(family,style,
styleHint,
script);
89 for (i = retList.
begin(); i != retList.
end(); ++i) {
90 bool contains =
false;
91 for (
int j = 0; j < db->
count; j++) {
iterator begin()
Returns an STL-style iterator pointing to the first item in the list.
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
The QStringList class provides a list of strings.
const char * styleHint(const QFontDef &request)
Q_CORE_EXPORT int QT_FASTCALL script(uint ucs4)
iterator erase(iterator pos)
Removes the item associated with the iterator pos from the list, and returns an iterator to the next ...
◆ initializeDb()
static void initializeDb |
( |
| ) |
|
|
static |
◆ load()
◆ loadEngine()
Definition at line 179 of file qfontdatabase_qpa.cpp.
Referenced by QFontDatabase::findFont(), QCoreTextFontEngineMulti::macFontID(), QFontEngineMacMulti::macFontID(), and QFontEngineMulti::stringToCMap().
189 if (family && !family->askedForFallback) {
196 family->askedForFallback =
true;
199 QStringList fallbacks = privateDb()->fallbackFamilies;
QStringList fallbackFamilies
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
The QStringList class provides a list of strings.
const char * styleHint(const QFontDef &request)
static QFontEngine * loadSingleEngine(int script, const QFontDef &request, QtFontFoundry *foundry, QtFontStyle *style, QtFontSize *size)
Style
This enum describes the different styles of glyphs that are used to display text. ...
Q_CORE_EXPORT int QT_FASTCALL script(uint ucs4)
StyleHint
Style hints are used by the font matching algorithm to find an appropriate default family if a select...
static QStringList fallbackFamilies(const QString &family, const QFont::Style &style, const QFont::StyleHint &styleHint, const QUnicodeTables::Script &script)
◆ loadSingleEngine()
Definition at line 150 of file qfontdatabase_qpa.cpp.
Referenced by loadEngine().
void insertEngine(const Key &key, QFontEngine *engine)
static QFontCache * instance()
static float pixelSize(const QFontDef &request, int dpi)
Q_CORE_EXPORT int QT_FASTCALL script(uint ucs4)
QFontEngine * findEngine(const Key &key)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
◆ qt_applyFontDatabaseSettings()
void qt_applyFontDatabaseSettings |
( |
const QSettings & |
settings | ) |
|
Definition at line 127 of file qfontdatabase_qpa.cpp.
131 for (
int i = 0; i < db->
count; ++i) {
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
Returns the value for setting key.
static void initializeDb()
QStringList fallbackFamilies
QStringList toStringList() const
Returns the variant as a QStringList if the variant has type() StringList, String ...
QStringList fallbackFamilies
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
bool contains(const QString &key) const
Returns true if there exists a setting called key; returns false otherwise.
◆ qt_registerFont()
Definition at line 55 of file qfontdatabase_qpa.cpp.
Referenced by QPlatformFontDatabase::registerFont().
62 styleKey.
style = style;
80 size->handle = handle;
QtFontStyle * style(const QtFontStyle::Key &, const QString &=QString(), bool=false)
The QString class provides a Unicode character string.
bool supported(QFontDatabase::WritingSystem) const
Returns true if the writing system given by writingSystem is supported; otherwise returns false...
static float pixelSize(const QFontDef &request, int dpi)
QtFontFamily * family(const QString &f, bool=false)
unsigned char writingSystems[QFontDatabase::WritingSystemsCount]
QtFontSize * pixelSize(unsigned short size, bool=false)
QtFontFoundry * foundry(const QString &f, bool=false)
◆ registerFont()