fonts not loading in my app
-
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.When I try to apply the font however, it is not applying in my app.
Anyone have any idea whats going on? -
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.When I try to apply the font however, it is not applying in my app.
Anyone have any idea whats going on?@MaximBozek
I don't use QML (I assume this is a QML question, better posted in that forum), but why do you useqrc:fonts/
instead ofqrc:/fonts/
? Does that make a difference? -
C Christian Ehrlicher moved this topic from General and Desktop on
-
@MaximBozek
I don't use QML (I assume this is a QML question, better posted in that forum), but why do you useqrc:fonts/
instead ofqrc:/fonts/
? Does that make a difference?@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?
-
@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?
@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 goqDebug() << QFile::exists(":/fonts/Onest-....ttf")
(I think that is right for non-QML, you could try on"qrc:/fonts/Onest-....ttf"
but I believe theqrc
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.