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

Fix #280, blur font on darwin #298

Merged
merged 8 commits into from
Dec 10, 2023
Merged

Fix #280, blur font on darwin #298

merged 8 commits into from
Dec 10, 2023

Conversation

zyxkad
Copy link
Contributor

@zyxkad zyxkad commented Dec 3, 2023

Font's on retina will be blur cause Rentina have 2x DPI
Now we times the DPI by 2 when on darwin, and scale the Label panel by 0.5 to keep the original size
Since we scaled the panel size back, so it should not affect much on non-Rentina darwin
However, if you are using non-darwin with rentina monitor, issue #280 will still happen, need a way to detect the monitor

Font's on retina will be blur cause Rentina have 2x DPI
Now we times the DPI by 2 when on darwin, and scale the Label panel by 0.5 to keep the original size
Since we scaled the panel size back, so it should not affect much on non-Rentina darwin
However, if you are using non-darwin with rentina monitor, issue g3n#280 will still happen, need a way to detect the monitor
@zyxkad
Copy link
Contributor Author

zyxkad commented Dec 3, 2023

Before:
Screenshot 2023-12-02 at 18 14 16

After:
Screenshot 2023-12-02 at 18 13 35

@danaugrs danaugrs merged commit 4e30d5c into g3n:master Dec 10, 2023
@danaugrs
Copy link
Member

Nice work, thanks!

xackery pushed a commit to xackery/engine that referenced this pull request Feb 28, 2024
* fix g3n#280
Font's on retina will be blur cause Rentina have 2x DPI
Now we times the DPI by 2 when on darwin, and scale the Label panel by 0.5 to keep the original size
Since we scaled the panel size back, so it should not affect much on non-Rentina darwin
However, if you are using non-darwin with rentina monitor, issue g3n#280 will still happen, need a way to detect the monitor

* remove a debug log

* we should devide on int but not floor, or the text will be out of shape

* Revert "we should devide on int but not floor, or the text will be out of shape"
I was completely wrong, we should divide on the floor or the text won't keep it's original size

This reverts commit 73f1b6a.

* use `window.Get().GetScale()` instead of hardcoded size and os

* use explicit rune casting to pass `go test`

* fix format for font.go

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

Successfully merging this pull request may close these issues.

2 participants