Skip to content
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

Macbook pro retina display fonts are pixelated (HiDPI) #259

Closed
xor-gate opened this issue May 22, 2016 · 12 comments
Closed

Macbook pro retina display fonts are pixelated (HiDPI) #259

xor-gate opened this issue May 22, 2016 · 12 comments

Comments

@xor-gate
Copy link

I know Qt supports HiDPI and why are we not building releases with HiDPI (since 5.6) ?
The font looks awefull on Macbook pro retina, probably also on Ubuntu powered Dell laptop with HiDPI.

See:
http://doc.qt.io/qt-5/highdpi.html
https://wiki.archlinux.org/index.php/HiDPI#Qt_5

@xor-gate xor-gate changed the title Macbook pro retina display pixelated Macbook pro retina display fonts are pixelated (HiDPI) May 22, 2016
@rocketman768
Copy link
Member

I didn't see anything in those articles about how to get the "native" scaling from OSX. I found the following on blog.qt.io

High DPI mode is controlled by the following keys in the Info.Plist file:

<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<string>True</string>

@rocketman768
Copy link
Member

I'm wondering if you can edit the plist in your installation and see how it looks.

@mikfire
Copy link
Contributor

mikfire commented May 22, 2016

Speaking for myself only.

I have no clue how to enable the builds for hidpmi.

I have no clue what versions of anything we claim to support. I would
prefer to avoid, where possible, enabling new features if it makes
reasonably recent platforms not work.

But. Mostly. It's that I don't have such a display. Until I do, the lack of
support is unlikely bother me. I also don't want to support something I
literally cannot see.

Mik
On May 22, 2016 05:52, "Jerry Jacobs" [email protected] wrote:

I know Qt supports HiDPI and why are we not building releases with HiDPI
(since 5.6) ?
The font looks awefull on Macbook pro retina, probably also on Ubuntu
powered Dell laptop with HiDPI.

See:
http://doc.qt.io/qt-5/highdpi.html
https://wiki.archlinux.org/index.php/HiDPI#Qt_5


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#259

@xor-gate
Copy link
Author

xor-gate commented May 22, 2016

I poked around which Qt version with 2.3.0 is shipped:

Jerrys-MacBook-Pro:MacOS jerry$ otool -L Brewtarget
Brewtarget:
    @rpath/QtPrintSupport.framework/Versions/5/QtPrintSupport (compatibility version 5.5.0, current version 5.5.1)
    @rpath/QtQml.framework/Versions/5/QtQml (compatibility version 5.5.0, current version 5.5.1)
    @rpath/QtSql.framework/Versions/5/QtSql (compatibility version 5.5.0, current version 5.5.1)
    @rpath/QtXml.framework/Versions/5/QtXml (compatibility version 5.5.0, current version 5.5.1)
    @rpath/QtWebKitWidgets.framework/Versions/5/QtWebKitWidgets (compatibility version 5.5.0, current version 5.5.1)
    @rpath/QtMultimedia.framework/Versions/5/QtMultimedia (compatibility version 5.5.0, current version 5.5.1)
    @rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.5.0, current version 5.5.1)
    @rpath/QtWebKit.framework/Versions/5/QtWebKit (compatibility version 5.5.0, current version 5.5.1)
    @rpath/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.5.0, current version 5.5.1)
    @rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.5.0, current version 5.5.1)
    @rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.5.0, current version 5.5.1)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

As stated by Qt website, since 5.6 the HiDPI is supported.

@xor-gate
Copy link
Author

@rocketman768 I have tried to update the plist but no difference.

@rocketman768
Copy link
Member

I would like to see this working. Looks crappy on my work mac. I can poke around and see if there's a way to enable highres mode.

@rocketman768 rocketman768 self-assigned this May 29, 2016
@xor-gate
Copy link
Author

xor-gate commented Jun 1, 2016

If there needs some testing to be done, just poke here.

@kapinga
Copy link
Contributor

kapinga commented Mar 4, 2017

I have played around with this some, and it should work on Qt 5.6 and later. (I tested on 5.8, but the blog post above indicates it should work starting with 5.6.)

One line of code is needed to activate HiDPI awareness. In main() in main.cpp, add
QGuiApplication::setAttribute( Qt::AA_EnableHighDpiScaling );
before app is initialized.
This can also be done by setting the environment variable QT_AUTO_SCREEN_SCALE_FACTOR to 1 before running brewtarget.exe (e.g. for testing).

I will note that there's a few UI issues that don't scale nicely in HiDPI mode (even though it's inifinitely better than nothing). In particular, the text on the RangedSliders gets cut off and probably should be changed to 12 pt Arial Bold, not 14 pt Arial Black.

The biggest change though is needing Qt 5.6+. TBH, I have no idea what the decision-making process is or what it involves to upgrade the packaged version of Qt.

brewtarget hidpi

@pricelessbrewing
Copy link
Contributor

@jawsdaws take a look at this issue as well. See if your patch for #434 fixes this as well.

@jawsdaws
Copy link
Contributor

I've made some changes to help with this problem over in https://github.com/jawsdaws/brewtarget/tree/HiDPI Activating HiDPI awareness is unreliable for me, so I've been using the DPI number to calculate the size of things that need changes. I only have Linux to test on. It would be awesome if anyone is willing and able to test that branchon Mac or Windows. :-)

@matty0ung
Copy link
Contributor

There is still some more work to do on this, but hopefully #502 has made things a bit better. (I have a high DPI display on my Linux laptop, but I hope the fixes that work there also benefit Mac users with highdpi...)
As mentioned above, just activating the "work with high DPI" switch is, unfortunately, an unsatisfactory solution. (On Linux for instance, it does nothing at all as far as I can tell.) So there is a bit more work to make things appear at sensible sizes on all resolution displays. Fortunately it's all very doable, so it's mostly a case of finding all the places where things are currently showing poorly on high DPI displays and applying similar fixes to the ones in the patch above.

@mattiasmaahl
Copy link
Collaborator

fixed in PR #502 , closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants