Comments (19)
From the title and text of your screenshot, it seems your Windows version is not using anti-aliasing.
from qtawesome.
True! Answer on http://superuser.com/questions/341636/why-windows-7-dialog-fonts-are-not-anti-aliased
from qtawesome.
We should be able to force anti-aliasing with painter.setRenderHint(QPainter.Antialiasing)
in the paint
method. Will fix this this week-end.
from qtawesome.
I tried that. It made no difference. But let me know
from qtawesome.
Ok so it seems that when TrueType is enabled in windows, qtawesome results in aliased icons. This is unexpected, because apparently qt should use trueype if enabled...
from qtawesome.
I also tried using font.setStyleStrategy(QFont.PreferAntialias)
but no luck so far.
Besides, forcing the size to be multiple of 14, which is the pixel perfect size of font awesome and the spyder makes anti-aliasing less necessary.
from qtawesome.
@SylvainCorlay, yep I had tried that one as well, but it is a weird "bug" from qt I think. Still even at pixel perfect if no antialias is in place icons will look pixelated like an 80's game :-)
from qtawesome.
Actually at pixel perfect size, it is difficult to see the difference .The problem remains for brand icons and such, (like the Python logo) which are not meant to be pixel perfect.
from qtawesome.
@ccordoba12 I had some questions on gitter regarding your qt build on windows.
from qtawesome.
We don't build Qt on Windows. We just use the binaries supplied by Riverbank (the company behind PyQt)
from qtawesome.
It seems that the binaries are not configured to use directwrite on Windows 7.
See: http://pyqt.sourceforge.net/Docs/PyQt4/qfont.html
Please be aware that altering the hinting preference on Windows is available through the DirectWrite font engine. This is available on Windows Vista after installing the platform update, and on Windows 7. In order to use this extension, configure Qt using -directwrite. The target application will then depend on the availability of DirectWrite on the target system.
from qtawesome.
Then what do we (i.e. Continuum) should do about it? Should we ask Riverbank for that option?
from qtawesome.
It seems that directwrite was intended to replace GDI and should probably be the preferred way of rendering fonts on screen. Although I should make some more experiments with my own build to be able to make an educated recommendation. The problem is that I don't use windows too often and my development machine is a Linux one.
@kovidgoyal replied to my email on the PyQt mailing list with some pointers at where to look
A few observations though:
- even with
ClearType
andSmooth edges
enabled (which is the default on all the machines I used, the fonts don't look quite as sharp as on linux, where is it nearly perfect.) - At pixel perfect size of the font, the problem is much less visible. There are some options in how text is rendered to try using certain preferred sizes.
from qtawesome.
Ok, let me know what you find to see what we can do about it in our side :-)
from qtawesome.
Btw, there is also the FreeType
font engine, which is used on linux, and can (apparently) be used for a windows build.
If one gets a build of qt where directwrite (or freetype) is enabled, it will support setting up hinting with QFont.setHintingPreference
, and we will be able to choose what we prefer among PreferDefaultHinting
PreferNoHinting
PreferVerticalHinting
PreferFullHinting
.
PreferDefaultHinting | PreferNoHinting | PreferVerticalHinting | PreferFullHinting | |
---|---|---|---|---|
Win Vista (w/o Platform Update) and earlier | Full hinting | Full hinting | Full hinting | Full hinting |
Win 7 and Win Vista (w/Platform Update) and DirectWrite enabled in Qt | Full hinting | Vertical hinting | Vertical hinting | Full hinting |
FreeType | Operating System setting | No hinting | Vertical hinting (light) | Full hinting |
Cocoa on Mac OS X | No hinting | No hinting | No hinting | No hinting |
from qtawesome.
@ccordoba12 you guys now ship freetype with Anaconda?
from qtawesome.
Yes, I think we have it available on all platforms. I'm totally sure on Linux and Mac, but not so sure on Windows :-)
from qtawesome.
Should we close this @ccordoba12 ?
from qtawesome.
Sure, let's do it.
from qtawesome.
Related Issues (20)
- Import error when importing `PYSIDE6` while using `QtPy` <= 1.x HOT 5
- Release QtAwesome 1.2.3 HOT 3
- Add Font Awesome 6 and remove deprecated Font Awesome 4 HOT 1
- qta-browser "Empty key passed" HOT 5
- Question: How are end users using qtawesome ? HOT 3
- memory leak when set spinning animation on icon (qtawesome 2.3.1 ; win11 ; pyside6.4.2) HOT 3
- PermissionError: [WinError 5] Access is denied HOT 22
- `Selected` option doesn't change `QPushButton` icon only icon color HOT 6
- Wrong default color for disabled state HOT 3
- Question: How to Change Icon Color HOT 2
- Create script to allow users to install our fonts system-wide HOT 3
- Question: Why is qtawesome using qtpy ? HOT 2
- Improve Codicons update command
- Release QtAwesome 1.3.0 HOT 1
- Check error running `example.py` on Windows CI
- [Question] material symbols extension
- Release QtAwesome 1.3.1 HOT 1
- Add `pre-commit` setup for formatting
- qta-browser not starting with PyQt6==6.7.0 backend HOT 3
- FileNotFoundError on fontawesome4-webfont-4.7.ttf HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qtawesome.