Giter VIP home page Giter VIP logo

Comments (19)

ccordoba12 avatar ccordoba12 commented on September 21, 2024

From the title and text of your screenshot, it seems your Windows version is not using anti-aliasing.

from qtawesome.

goanpeca avatar goanpeca commented on September 21, 2024

True! Answer on http://superuser.com/questions/341636/why-windows-7-dialog-fonts-are-not-anti-aliased

image

from qtawesome.

SylvainCorlay avatar SylvainCorlay commented on September 21, 2024

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.

goanpeca avatar goanpeca commented on September 21, 2024

I tried that. It made no difference. But let me know

from qtawesome.

goanpeca avatar goanpeca commented on September 21, 2024

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.

SylvainCorlay avatar SylvainCorlay commented on September 21, 2024

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.

goanpeca avatar goanpeca commented on September 21, 2024

@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.

SylvainCorlay avatar SylvainCorlay commented on September 21, 2024

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.

SylvainCorlay avatar SylvainCorlay commented on September 21, 2024

@ccordoba12 I had some questions on gitter regarding your qt build on windows.

from qtawesome.

ccordoba12 avatar ccordoba12 commented on September 21, 2024

We don't build Qt on Windows. We just use the binaries supplied by Riverbank (the company behind PyQt)

from qtawesome.

SylvainCorlay avatar SylvainCorlay commented on September 21, 2024

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.

ccordoba12 avatar ccordoba12 commented on September 21, 2024

Then what do we (i.e. Continuum) should do about it? Should we ask Riverbank for that option?

from qtawesome.

SylvainCorlay avatar SylvainCorlay commented on September 21, 2024

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 and Smooth 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.

ccordoba12 avatar ccordoba12 commented on September 21, 2024

Ok, let me know what you find to see what we can do about it in our side :-)

from qtawesome.

SylvainCorlay avatar SylvainCorlay commented on September 21, 2024

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.

SylvainCorlay avatar SylvainCorlay commented on September 21, 2024

@ccordoba12 you guys now ship freetype with Anaconda?

from qtawesome.

ccordoba12 avatar ccordoba12 commented on September 21, 2024

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.

goanpeca avatar goanpeca commented on September 21, 2024

Should we close this @ccordoba12 ?

from qtawesome.

ccordoba12 avatar ccordoba12 commented on September 21, 2024

Sure, let's do it.

from qtawesome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.