Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Prevent Qt from using system fonts
QtWS25 Last Chance

Prevent Qt from using system fonts

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 780 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prismatic
    wrote on last edited by
    #1

    I'm trying to get Qt to use only font files I specify, but it reverts to loading fonts from my system instead. For example, I call something like:

    @FontLoader { id: sourcesanspro; source: "fonts/SourceSansPro-Semibold.ttf"; }@

    Then use the font in a Text item by specifying
    @font.family: sourcesanspro.name;@

    But Qt looks up the same font from my system instead. It won't use the "Semibold" variant, and instead load whatever it thinks the "regular" weight of the font is. I don't want this behavior -- I just want it to use the specified file and to ignore all other fonts. How can I do this?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved