QmlProjectManager: Improve font loading for the QDS landing page

The Titillium Web font comes in a QML module with FontLoader. Use that
instead of QFontDataBase, and retrieve the exact family name.

This also ensures that the font is loaded when editing the page in QDS
(if it is not loaded before e.g. by the QDS Welcome Screen).

Change-Id: I2cbec7fbc09fb4d4d31c513441c7cabbbbc5001d
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
Alessandro Portale
2022-07-18 18:50:26 +02:00
parent 1732c79fa5
commit ee5ffafa45
3 changed files with 3 additions and 2 deletions

View File

@@ -266,7 +266,6 @@ bool QmlProjectPlugin::initialize(const QStringList &, QString *errorMessage)
d = new QmlProjectPluginPrivate;
if (!qmlDesignerEnabled()) {
QFontDatabase::addApplicationFont(":/studiofonts/TitilliumWeb-Regular.ttf");
d->landingPage = new QdsLandingPage();
qmlRegisterSingletonInstance<QdsLandingPage>("LandingPageApi",
1,