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 blurry text on Apple retina display #799

Merged
merged 1 commit into from
Jun 30, 2023

Conversation

VitoVan
Copy link
Contributor

@VitoVan VitoVan commented Jun 30, 2023

imagen

This patch handles the text rendering on high-DPI screen for macOS.

I mark this PR Work-in-Progress, because I haven't fully tested this patch, here is the check list:

For MacOS

  • no more blurry text on macOS with retina screen
  • automatic font resizing when moving window between high-DPI screen and low-DPI screen
  • don't break low-DPI screen rendering (when start from the low-DPI screen)

For other platforms

@VitoVan VitoVan changed the title WIP: fix blury text on Apple retina display WIP: fix blurry text on Apple retina display Jun 30, 2023
@VitoVan VitoVan force-pushed the fix-apple-retina-display branch 2 times, most recently from 204f880 to f6f0cd5 Compare June 30, 2023 07:55
@VitoVan
Copy link
Contributor Author

VitoVan commented Jun 30, 2023

Current problem:

If :accelerated is not allowed in renderer flags, then the high-DPI problem could be very hard to solve.

Without that flag, SDL2 won't be high-DPI awareness, so we can't handle it.

But, it seems there are also some problems when we set that flag: #787

So, what's your thought?

I'm going to make this patch macOS only.

For other platform, let's solve it as another problem.

@VitoVan VitoVan force-pushed the fix-apple-retina-display branch 2 times, most recently from 5eb3b90 to 6fd731d Compare June 30, 2023 12:12
@VitoVan VitoVan changed the title WIP: fix blurry text on Apple retina display fix blurry text on Apple retina display Jun 30, 2023
@VitoVan
Copy link
Contributor Author

VitoVan commented Jun 30, 2023

This is my first PR, I must have done many things inappropriate, so if you saw any, please don't hesitate to tell me.

@cxxxr
Copy link
Member

cxxxr commented Jun 30, 2023

Thank you very much for the great PR.

@cxxxr cxxxr merged commit 0e42e76 into lem-project:main Jun 30, 2023
@VitoVan VitoVan deleted the fix-apple-retina-display branch June 30, 2023 22:44
@cxxxr cxxxr mentioned this pull request Jul 11, 2023
6 tasks
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.

None yet

2 participants