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. fonts not loading in my app
Forum Updated to NodeBB v4.3 + New Features

fonts not loading in my app

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 Posters 294 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.
  • M Offline
    M Offline
    MaximBozek
    wrote on last edited by
    #1

    Hi,

    I am programming a remote linux device.
    I loaded my fonts using FontLoader{}. The fonts are coming from files that are i added to my projects through a recourse file.

    95a1b26b-fdfc-49a7-8db3-7da2d19f1fe7-image.png

    8986680b-b0b5-431f-a61d-8d399d97f0cf-image.png

    1320843a-8680-465d-a41d-31e5fb18e112-image.png

    When I try to apply the font however, it is not applying in my app.
    Anyone have any idea whats going on?

    JonBJ 1 Reply Last reply
    0
    • M MaximBozek

      Hi,

      I am programming a remote linux device.
      I loaded my fonts using FontLoader{}. The fonts are coming from files that are i added to my projects through a recourse file.

      95a1b26b-fdfc-49a7-8db3-7da2d19f1fe7-image.png

      8986680b-b0b5-431f-a61d-8d399d97f0cf-image.png

      1320843a-8680-465d-a41d-31e5fb18e112-image.png

      When I try to apply the font however, it is not applying in my app.
      Anyone have any idea whats going on?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @MaximBozek
      I don't use QML (I assume this is a QML question, better posted in that forum), but why do you use qrc:fonts/ instead of qrc:/fonts/? Does that make a difference?

      M 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher moved this topic from General and Desktop on
      • JonBJ JonB

        @MaximBozek
        I don't use QML (I assume this is a QML question, better posted in that forum), but why do you use qrc:fonts/ instead of qrc:/fonts/? Does that make a difference?

        M Offline
        M Offline
        MaximBozek
        wrote on last edited by MaximBozek
        #3

        @JonB yeah, doesn't work

        maybe the issue lies in the fact that the .ttf files have to be installed on the remote linux device?

        JonBJ 1 Reply Last reply
        0
        • M MaximBozek

          @JonB yeah, doesn't work

          maybe the issue lies in the fact that the .ttf files have to be installed on the remote linux device?

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @MaximBozek
          Bear in mind that I don't know anything about QML, only non-QML/widgets Qt. There I would expect to be able to go qDebug() << QFile::exists(":/fonts/Onest-....ttf") (I think that is right for non-QML, you could try on "qrc:/fonts/Onest-....ttf" but I believe the qrc is for QML only) and see it confirm that it can find that resource file at least. Can you do something similar from QML? I don't know that you can use any C++ code so I have to leave it to you).

          I don't know anything about whether fonts actually have to be installed or not. One would have thought not, they would work from the resource file, but I don't know.

          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