uwerat / qskinny

A lightweight framework on top of the Qt scene graph and only few classes from Qt/Quick. It is usable from C++ and/or QML.
1.45k stars 293 forks source link

How to change font #435

Closed hestrro closed 1 month ago

hestrro commented 1 month ago

Can I apply the fonts from this website to QSkinny 。 https://fonts.google.com/ I found createFont() in material skin plugin

uwerat commented 1 month ago

This is usually the job of the platform. If you want to load fonts manually you can use QFontDatabase::addApplicationFont - f.e how it is done in the examples ( see SkinnyNamespace.cpp ). Conceptually it is the job of the Skins to initialize font roles with specific fonts that had been loaded before ( done in the createFont for the material skin ). In application code you deal with the font roles.