Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qfontconfigdatabase.cpp File Reference

(a12966b3e7897db10771300b81fc9460af012325)

#include "qfontconfigdatabase_p.h"
#include "qfontenginemultifontconfig_p.h"
#include <QtGui/private/qfontengine_ft_p.h>
#include <QtCore/QList>
#include <QtCore/QElapsedTimer>
#include <QtCore/QFile>
#include <qpa/qplatformnativeinterface.h>
#include <qpa/qplatformscreen.h>
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformservices.h>
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/qguiapplication.h>
#include <QtCore/private/qduplicatetracker_p.h>
#include <fontconfig/fontconfig.h>
+ Include dependency graph for qfontconfigdatabase.cpp:

Go to the source code of this file.

Functions

static QT_BEGIN_NAMESPACE int mapToQtWeightForRange (int fcweight, int fcLower, int fcUpper, int qtLower, int qtUpper)
 
static int weightFromFcWeight (int fcweight)
 
static int stretchFromFcWidth (int fcwidth)
 
static const char * getFcFamilyForStyleHint (const QFont::StyleHint style)
 
static bool requiresOpenType (int writingSystem)
 
static void populateFromPattern (FcPattern *pattern, QFontDatabasePrivate::ApplicationFont *applicationFont=nullptr, FT_Face face=nullptr, QFontconfigDatabase *db=nullptr)
 
static bool isDprScaling ()
 
static FcPatternqueryFont (const FcChar8 *file, const QByteArray &data, int id, FcBlanks *blanks, int *count, FT_Face *face)
 

Variables

static const char specialLanguages [][6]
 
static const char languageForWritingSystem [][6]
 

Function Documentation

◆ getFcFamilyForStyleHint()

static const char * getFcFamilyForStyleHint ( const QFont::StyleHint style)
static

Definition at line 338 of file qfontconfigdatabase.cpp.

References QFont::Cursive, QFont::Fantasy, QFont::Monospace, QFont::SansSerif, QFont::Serif, and QFont::TypeWriter.

Referenced by QFontconfigDatabase::fallbacksForFamily().

+ Here is the caller graph for this function:

◆ isDprScaling()

static bool isDprScaling ( )
static

Definition at line 549 of file qfontconfigdatabase.cpp.

References qApp, and qFuzzyCompare().

+ Here is the call graph for this function:

◆ mapToQtWeightForRange()

static QT_BEGIN_NAMESPACE int mapToQtWeightForRange ( int fcweight,
int fcLower,
int fcUpper,
int qtLower,
int qtUpper )
inlinestatic

Definition at line 33 of file qfontconfigdatabase.cpp.

Referenced by weightFromFcWeight().

+ Here is the caller graph for this function:

◆ populateFromPattern()

static void populateFromPattern ( FcPattern * pattern,
QFontDatabasePrivate::ApplicationFont * applicationFont = nullptr,
FT_Face face = nullptr,
QFontconfigDatabase * db = nullptr )
static

Definition at line 370 of file qfontconfigdatabase.cpp.

References db, FontFile::fileName, QString::fromLocal8Bit(), QString::fromUtf8(), j, languageForWritingSystem, QFontDatabase::Other, properties, QByteArray(), QPlatformFontDatabase::registerAliasToFontFamily(), QPlatformFontDatabase::registerFont(), requiresOpenType(), QSupportedWritingSystems::setSupported(), stretchFromFcWidth(), QFont::StyleItalic, QFont::StyleNormal, QFont::StyleOblique, weightFromFcWeight(), and QFontDatabase::WritingSystemsCount.

Referenced by QFontconfigDatabase::addApplicationFont(), and QFontconfigDatabase::populateFontDatabase().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ queryFont()

static FcPattern * queryFont ( const FcChar8 * file,
const QByteArray & data,
int id,
FcBlanks * blanks,
int * count,
FT_Face * face )
static

Definition at line 838 of file qfontconfigdatabase.cpp.

References file, Q_UNUSED, and qt_getFreetype().

Referenced by QFontconfigDatabase::addApplicationFont().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ requiresOpenType()

static bool requiresOpenType ( int writingSystem)
inlinestatic

Definition at line 364 of file qfontconfigdatabase.cpp.

References QFontDatabase::Khmer, QFontDatabase::Nko, QFontDatabase::Sinhala, and QFontDatabase::Syriac.

Referenced by populateFromPattern().

+ Here is the caller graph for this function:

◆ stretchFromFcWidth()

static int stretchFromFcWidth ( int fcwidth)
inlinestatic

Definition at line 71 of file qfontconfigdatabase.cpp.

Referenced by populateFromPattern().

+ Here is the caller graph for this function:

◆ weightFromFcWeight()

static int weightFromFcWeight ( int fcweight)
inlinestatic

Definition at line 38 of file qfontconfigdatabase.cpp.

References QFont::Black, QFont::Bold, QFont::DemiBold, QFont::ExtraBold, QFont::ExtraLight, QFont::Light, mapToQtWeightForRange(), QFont::Medium, QFont::Normal, QFONT_WEIGHT_MAX, and QFont::Thin.

Referenced by populateFromPattern().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ languageForWritingSystem

const char languageForWritingSystem[][6]
static

Definition at line 257 of file qfontconfigdatabase.cpp.

Referenced by populateFromPattern().

◆ specialLanguages

const char specialLanguages[][6]
static

Definition at line 87 of file qfontconfigdatabase.cpp.

Referenced by QFontconfigDatabase::fallbacksForFamily().