diff options
Diffstat (limited to 'src/gui/text/qplatformfontdatabase.cpp')
-rw-r--r-- | src/gui/text/qplatformfontdatabase.cpp | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/src/gui/text/qplatformfontdatabase.cpp b/src/gui/text/qplatformfontdatabase.cpp index eb54a4e5cb..a146254f68 100644 --- a/src/gui/text/qplatformfontdatabase.cpp +++ b/src/gui/text/qplatformfontdatabase.cpp @@ -279,6 +279,17 @@ QFontEngineMulti *QPlatformFontDatabase::fontEngineMulti(QFontEngine *fontEngine /*! Returns the font engine that can be used to render the font described by the font definition, \a fontDef, in the specified \a script. + + This function is called by QFontDatabase both for system fonts provided + by the platform font database, as well as for application fonts added by + the application developer. + + The handle is the QPlatformFontDatabase specific handle passed when + registering the font family via QPlatformFontDatabase::registerFont. + + The function is called for both fonts added via a filename as well + as fonts added from QByteArray data. Subclasses will need to handle + both cases via its platform specific handle. */ QFontEngine *QPlatformFontDatabase::fontEngine(const QFontDef &fontDef, void *handle) { @@ -288,6 +299,13 @@ QFontEngine *QPlatformFontDatabase::fontEngine(const QFontDef &fontDef, void *ha return nullptr; } +/*! + Returns the font engine that will be used to back a QRawFont, + based on the given \fontData, \a pixelSize, and \a hintingPreference. + + This function is called by QRawFont, and does not play a part in + the normal operations of QFontDatabase. +*/ QFontEngine *QPlatformFontDatabase::fontEngine(const QByteArray &fontData, qreal pixelSize, QFont::HintingPreference hintingPreference) { @@ -600,13 +618,19 @@ void QPlatformFontDatabase::registerAliasToFontFamily(const QString &familyName, } /*! - Inform the Qt font database that the platform's available fonts have changed. + Requests that the platform font database should be repopulated. This will result in invalidating the entire font database. + The next time the font database is accessed it will be repopulated + via a call to QPlatformFontDatabase::populate(). + + Application fonts will not be removed, and will be automatically + populated when the font database is repopulated. + \since 6.4 */ -void QPlatformFontDatabase::handleAvailableFontsChanged() +void QPlatformFontDatabase::repopulateFontDatabase() { QFontDatabasePrivate::instance()->invalidate(); } @@ -622,6 +646,18 @@ bool QPlatformFontDatabase::isFamilyPopulated(const QString &familyName) } /*! + Returns true if this font database supports loading named instances from variable application + fonts. + + \since 6.7 +*/ +bool QPlatformFontDatabase::supportsVariableApplicationFonts() const +{ + return false; +} + + +/*! \class QPlatformFontDatabase \since 5.0 \internal |