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

Allow entry of unicode characters into overmap notes #37309

Open
damien opened this issue Jan 22, 2020 · 6 comments
Open

Allow entry of unicode characters into overmap notes #37309

damien opened this issue Jan 22, 2020 · 6 comments
Labels
Controls / Input Keyboard, mouse, keybindings, input UI, etc. Map / Mapgen Overmap, Mapgen, Map extras, Map display (P5 - Long-term) Long-term WIP, may stay on the list for a while.

Comments

@damien
Copy link
Contributor

damien commented Jan 22, 2020

Is your feature request related to a problem? Please describe.
It would be nice to specify more distinct characters or glyphs into user defined notes in the overmap UI.

Describe the solution you'd like
The ability to directly enter unicode sequences into the overmap notes UI, either by escape sequence (e.g. \u2693, which is ) or direct keyboard input.

Describe alternatives you've considered
Graphical Overmap mod helps here, but doesn't really allow users to define their own overmap glyphs to the extent that is possible via JSON terrain entries.

Additional context
I'm also wondering how hard it would be to allow users to define background/inverted colors for overmap note entries as well. May open up a separate issue for that and try my hand at contributing if these features don't seem like a terrible idea to you all.

@damien damien changed the title Allow entry of nicode charachters into overmap notes Allow entry of unicode characters into overmap notes Jan 22, 2020
@ZhilkinSerg
Copy link
Contributor

You can enter Unicode characters using ALT+numeric keyboard.

image

It depends on the font used which symbols would be available for you.

@damien
Copy link
Contributor Author

damien commented Jan 23, 2020

Hey @ZhilkinSerg!

This is totally doable, but I've had a couple difficulties with that particular input method:

  1. I believe this is an input method specific to Windows. If you're on another OS (Linux/macOS), I'm unaware of ways to enter non-ASCII chars that don't appear on a user's keyboard.
  2. While that is a way to input non-ASCII characters on Windows, it's based off of Code page 437 (a very old IBM/DOS charset) or, for charachters with a single leading 0, Windows-1252 , which is another single-byte char encoding. While some of these characters also exist in Unicode, they exist under different code points.
  3. The Windows input method doesn't allow me to use the more fun Unicode chars like (U+262D), (U+2622), or (U+2620).

I'm am happy to hear that I do have more options than I previously thought with the Windows code points you turned me on to with your reply @ZhilkinSerg , but I'd be tickled pink with the ability to mark radioactive areas on my map with :)

EDIT: References:

@damien
Copy link
Contributor Author

damien commented Jan 23, 2020

PS: There is a lot of interesting history behind Windows ALT codes. TIL. 😂

@anothersimulacrum
Copy link
Member

I think #37301 (comment) was aimed here.

@BevapDin
Copy link
Contributor

get_note_symbol (in "src/overmap_ui.cpp") only extracts a single char from the note to be used as symbol. The game will therefor not show UTF-8 sequences that are encoded with several bytes. This would need to be changed to return arbitrary strings containing a single effective character.

@Night-Pryanik Night-Pryanik added Controls / Input Keyboard, mouse, keybindings, input UI, etc. Map / Mapgen Overmap, Mapgen, Map extras, Map display labels Jan 26, 2020
@stale
Copy link

stale bot commented Feb 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Feb 25, 2020
@kevingranade kevingranade added the (P5 - Long-term) Long-term WIP, may stay on the list for a while. label Feb 25, 2020
@stale stale bot removed the stale Closed for lack of activity, but still valid. label Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Controls / Input Keyboard, mouse, keybindings, input UI, etc. Map / Mapgen Overmap, Mapgen, Map extras, Map display (P5 - Long-term) Long-term WIP, may stay on the list for a while.
Projects
None yet
Development

No branches or pull requests

6 participants