New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problems with font (introducing ListItem) #24
Comments
The font files should be bundled with the library as resources. See
These are then loaded by the style class (QtMaterialStyle). See
|
I don't have the font installed on my system, no. |
I used the unix switch for grep on a windows workstation... no dir recursion... sorry about this. This evening I will try on my home notebook, and will try this code snippet to see what happens with the fonts: I still think that setPointSize call should not be necessary it the correct font is returned from the FontDatabase. |
I confirm there is a problem with the font loading. I think the problem is in the resource file... I'm not even sure you are using roboto font due to a mismatch in the path name... See the changes in the respource file: |
What if you put the fonts in the same directory as the icons? I mean, just copy the whole fonts directory into |
The resource path is not a one-to-one mapping to the file system path, because of how the resource system works in Qt. See http://doc.qt.io/qt-5/resources.html. (The IDE complains if I try to use an incorrect resource path.) |
I'll try on a different machine also when I get the chance, to see if I can figure out what the problem is. |
An alias should be used in the resource file, in this way: then load in this way: This is an official way to load resources via aliases. I then created font via: |
Ok, I think I understand now. Does 2ee5d6d work or? |
It works now :-) Thank you |
In my fork I pushed a first try at ListItem. It is a test.. and both worked and not worked...
As you can see, the font is "strange"... I think that Qt is stretching it a bit...
I did some more tests and noticed that I don't have Roboto font installed on my workstation. And that the library doesn't load them with ::addApplicationFont.
Also loading the font, I still have problems, the font is not used. If I ask for an installed font, it is used without problem.
Also trying to load another external font I get the default font....
Actually, wherever you have to use this code snippet:
means that font object has no size 16 and you have to force it....
I don't know what other test to do...
Do you have the font installed?
The text was updated successfully, but these errors were encountered: