go-flutter-desktop / go-flutter

Flutter on Windows, MacOS and Linux - based on Flutter Embedding, Go and GLFW.
https://hover.build/
BSD 3-Clause "New" or "Revised" License
5.87k stars 283 forks source link

Enlarged and blurry texts on Release and Release-Debug builds #528

Closed edTheGuy00 closed 4 years ago

edTheGuy00 commented 4 years ago

I'm not sure if this is an issue with Flutter itself or Hover, The only issues I found are related to the web and Chrome 32274, 58159. So far it appears to be only on macOS, but I will double check on Windows

This is how my text looks like when running just hover run

Screen Shot 2563-10-26 at 10 04 03

But this is how it comes out with hover build darwin-dmg or hover build darwin-dmg --debug

Screen Shot 2563-10-26 at 10 03 29

Hover doctor

hover: Hover version v0.44.0 running on darwin
hover: Sharing flutter version
Flutter 1.22.1 • channel beta • https://github.com/flutter/flutter.git
Framework • revision f30b7f4db9 (2 weeks ago) • 2020-10-08 10:06:30 -0700
Engine • revision 75bef9f6c8
Tools • Dart 2.10.1
hover: Flutter engine commit: https://github.com/flutter/engine/commit/75bef9f6c8ac2ed4e1e04cdfcd88b177d9f1850d
hover: Finding out the C compiler version
Apple clang version 12.0.0 (clang-1200.0.32.21)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
pchampio commented 4 years ago

I have no idea of where it could come from. Maybe manually set the flutter.ForcePixelRatio(2.0) option ? https://github.com/go-flutter-desktop/go-flutter/wiki/Options

edTheGuy00 commented 4 years ago

@pchampio Whatever value I set, the Release build is still noticeable larger and pixelated compared the Debug version. Might it be related with this PR? https://github.com/go-flutter-desktop/go-flutter/pull/458

pchampio commented 4 years ago

@edTheGuy00 not its not related, ForcePixelRatio overwrite the logic in #458

the Release build is still noticeable larger and pixelated compared the Debug version.

Wait, this is not the same as

But this is how (larger and pixelated) it comes out with hover build darwin-dmg or hover build darwin-dmg --debug Screen Shot 2563-10-26 at 10 03 29

Do you have the issue with: hover build darwin-dmg --debug ??

edTheGuy00 commented 4 years ago

@pchampio both hover build darwin-dmg and hover build darwin-dmg --debug have the same result.

The other thing I noticed is that even the text on the Title Bar comes out pixelated, including close, minimize and expand buttons

hover run

Screen Shot 2563-10-29 at 17 57 26 Screen Shot 2563-10-29 at 17 38 59

hover build darwin-dmg and hover build darwin-dmg --debug

Screen Shot 2563-10-29 at 17 56 17 Screen Shot 2563-10-29 at 17 41 21

pchampio commented 4 years ago

Using hover build darwin --debug (No dmg packing!) can you and execute the program using ./go/build/outputs/darwin/{your_app} and check if you have the same result ?

edTheGuy00 commented 4 years ago

Using hover build darwin --debug (No dmg packing!) can you and execute the program using ./go/build/outputs/darwin/{your_app} and check if you have the same result ?

Yea, this works, it looks normal (not enlarged and pixelated)

pchampio commented 4 years ago

Then the issue comes from the dmg packaging. @jld3103 do you have any idea ?

Maybe related to: https://discussion.evernote.com/forums/topic/117526-ragged-text-resolution-in-latest-update/ https://eshop.macsales.com/blog/46527-is-macos-mojave-making-some-fonts-blurry-heres-how-to-fix-it/

I have no Idea...

provokateurin commented 4 years ago

Could this be the same? https://github.com/IJHack/QtPass/issues/355#issuecomment-374162323

provokateurin commented 4 years ago

To try if it fixes it put

        <key>NSPrincipalClass</key>
        <string>NSApplication</string>

into the Info.plist dict. You can try adding

        <key>NSHighResolutionCapable</key>
        <string>True</string>

too.

edTheGuy00 commented 4 years ago

@pchampio @jld3103 Ok, adding

        <key>NSPrincipalClass</key>
        <string>NSApplication</string>

Fixes the issue.

provokateurin commented 4 years ago

Great. I'll add it to the standard template