-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
minus-circle not working #97
Comments
@darkvertex, could you chime in here, please? |
@ccordoba12 yep... (My Linux OS skin is dark, so forgive the dark screenshots.) I'm on CentOS Linux at the moment. I tried the first code snippet with
I tried with I gather from the style of your window in your screenshot that you're in Windows. (Am I right?) It should work the same way in theory. I haven't had a chance to try to reproduce the issue on Windows myself yet but I'll try when I'm home on my laptop. (I only have Linux at work.) Any other details about your environment you'd like to share? It may be helpful to know a few more things: What Windows version are you on, 8 or 10? What PyQt5 version do you have at the moment? On what Python version are you? |
@flutefreak7, thanks for going deep with this. It seems the new FontAwesome 5 support won't work on Windows, sorry. |
There are clearly lots of workarounds to get around this if it's a Windows 10 QFont issue:
I came up with a solution that works for me that does the TTF font-family rename dynamically within the _instance() function if the user is on Windows and has fontTools installed. I also had to temporarily disable the hash check for the solid file. This is rough, but perhaps could inspire a cleaner fix or help someone else with the same problem. Sorry I'm not great at Git, so here's a zip file of my changes: |
Tried using Edit: the TTF with the renamed font family could always just be a copy included as a custom font or with a different prefix or something to avoid altering the ttf file from font awesome. |
@flutefreak7 It seems setWeight does the trick :
as a result : |
@jules-ch: Nice! Wanna go ahead and make a PR for this little fix? @ccordoba12: It seems harmless to me but do you think there are any repercussions to setting the font weight for |
Tried this at home on Windows 10 & PyQt 5.11.2 and setWeight is not working as @flutefreak7 said. |
I think I'd prefer renaming the fonts with that renamer tool. It sounds like the safest choice. |
Just to add to the confusion, according to the docs, Qt uses a 0-99 weight system rather than the system used by... CSS, typography people, and everyone else, so I'm not sure what value is even expected for that to work. I do recall someone on Mac in a Stack Overflow post having issues with setWeight for complex fonts with lots of different weights. |
When I check font.weight() for the 2 fonts I get 50 for both (which should be the default), so at least in my environment that doesn't appear to work as a way to differentiate the two. |
@flutefreak7, @jules-ch, we're welcome to take the solution you think is the best one because fixing this is not a priority for us. |
…ree (Regular)" and "QtAwesome FontAwesome 5 Free (Solid)" to fix Windows bug spyder-ide#97
@flutefreak7 @jules-ch I made a PR using fontname.py to edit the font families, could you give it a try and tell me if it works better for you guys? |
…r" and "FontAwesome 5 Free Solid". (Fixes spyder-ide#97.)
…r" and "FontAwesome 5 Free Solid". (Fixes spyder-ide#97.)
Fixed in v0.5.1 - enjoy! 🎉 |
I'm on Windows 10 with PyQt5.
The following demo:
Gives me this:
The text was updated successfully, but these errors were encountered: