Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qfontconfigdatabase.cpp File Reference
#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/private/qhighdpiscaling_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)
 
static FcPatternqueryFont (const FcChar8 *file, const QByteArray &data, int id, FcBlanks *blanks, int *count)
 

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 337 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:

◆ mapToQtWeightForRange()

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

Definition at line 32 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 
)
static

Definition at line 369 of file qfontconfigdatabase.cpp.

References FontFile::fileName, QString::fromLocal8Bit(), QString::fromUtf8(), FontFile::indexValue, j, languageForWritingSystem, QFontDatabase::Other, properties, 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 
)
static

Definition at line 806 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 363 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 70 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 37 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 256 of file qfontconfigdatabase.cpp.

Referenced by populateFromPattern().

◆ specialLanguages

const char specialLanguages[][6]
static

Definition at line 86 of file qfontconfigdatabase.cpp.

Referenced by QFontconfigDatabase::fallbacksForFamily().