Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

If a PC does not have a certain font in its db, would a GUI using this font work well?



  • I'm developing a GUI and inside it [for the text browser] I'm using a specific font (e.g. Consolas). Since Consolas is on my development platform then I can see it on QT Creator. However when I deploy the GUI on another PC, would the user properly see this font if they don't have it installed on their machine?



  • @mhmdkanj
    Well, if they don't have the explicit font you name on their machine, an alternative will be chosen automatically/silently. So it won't look exactly the same. Unless they have the font installed, or you supply the required font with your distribution, and do whatever is necessary during installation.



  • @JonB Many thanks for your reply. Is there a clean/official way to "supply the required font" or "do whatever is necessary during installation" with QT?


  • Moderators

    @mhmdkanj font's usually come in ttf files (or similar) Simply copy such a file into the install directory, or pack it into the binary with the Ressource system. And in the main, you can add the font via QFontDatabade::addApplicationFont


Log in to reply