Skip to content

Notify user if font not display some characters#2490

Merged
skylot merged 4 commits intoskylot:masterfrom
MrIkso:feat_notify_about_not_display_char
May 22, 2025
Merged

Notify user if font not display some characters#2490
skylot merged 4 commits intoskylot:masterfrom
MrIkso:feat_notify_about_not_display_char

Conversation

@MrIkso
Copy link
Copy Markdown
Contributor

@MrIkso MrIkso commented May 17, 2025

This PRs add warning message, if code has non-displayable character. Fix #621

image

@skylot
Copy link
Copy Markdown
Owner

skylot commented May 18, 2025

@MrIkso this check is great, but it might be very annoying to see it every time a project loaded or reloaded. Also, if user will go to settings and change editor font, warning may appear again, because it is unclear which characters not supported and what font support them.
Maybe we can collect all problematic characters and show them in editor within warning window, and add a font selection button to allow users to verify that a selected font is better. Or maybe automatically check all available fonts and show only better ones 🤣

@skylot skylot marked this pull request as draft May 18, 2025 19:10
@MrIkso
Copy link
Copy Markdown
Contributor Author

MrIkso commented May 18, 2025

@skylot

but it might be very annoying to see it every time

This check only works when deobfuscation is not used and renaming is disabled.

Maybe we can collect all problematic characters and show them in editor

I don't know, there are characters that no font can display. Also I don't know how long it would take to fully check the code, if it very bigger with all non-printing characters. As part of the optimization it only goes through once and if at least one non-printing character is found, everything stops and a warning is displayed.
The question is quite interesting.

@MrIkso
Copy link
Copy Markdown
Contributor Author

MrIkso commented May 21, 2025

but it might be very annoying to see it every time a project loaded or reloaded

Maybe we can collect all problematic characters and show them in editor within warning window, and add a font selection button to allow users to verify that a selected font is better

@skylot some improves

java_nlpctsHF1f.mp4

@MrIkso MrIkso marked this pull request as ready for review May 21, 2025 22:29
Copy link
Copy Markdown
Owner

@skylot skylot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great 👍

@skylot skylot merged commit a0a9f7f into skylot:master May 22, 2025
4 checks passed
@MrIkso MrIkso deleted the feat_notify_about_not_display_char branch May 22, 2025 23:33
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.

Notify user if the used font doesn't not display some characters

2 participants