Skip to content

fix blurry text on Apple retina display#799

Merged
cxxxr merged 1 commit intolem-project:mainfrom
VitoVan:fix-apple-retina-display
Jun 30, 2023
Merged

fix blurry text on Apple retina display#799
cxxxr merged 1 commit intolem-project:mainfrom
VitoVan:fix-apple-retina-display

Conversation

@VitoVan
Copy link
Copy Markdown
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 force-pushed the fix-apple-retina-display branch from b6c7821 to 92fb6ea Compare June 30, 2023 05:57
@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
Copy Markdown
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
Copy Markdown
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.

@VitoVan VitoVan force-pushed the fix-apple-retina-display branch from 6fd731d to 623633c Compare June 30, 2023 13:28
@VitoVan VitoVan force-pushed the fix-apple-retina-display branch from 623633c to 894d35c Compare June 30, 2023 13:31
@cxxxr
Copy link
Copy Markdown
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.

2 participants