Picocrypt / Picocrypt

A very small, very simple, yet very secure encryption tool.
GNU General Public License v3.0
150 stars 7 forks source link

Non-ascii comments are not displayed correctly #23

Open hakavlad opened 2 weeks ago

hakavlad commented 2 weeks ago

Non-ascii comments are displayed as ?????????????. Can this be fixed?

HACKERALERT commented 2 weeks ago

Not too sure, I believe it might be because the font doesn't support it. I forget what the font was exactly because I named it font.ttf 🤦 but it might be Noto Sans. Not a big deal, 3 possible solutions:

  1. Change font. Ideally not, some of the UI has been designed around the particular font size/width
  2. Add note to README. This is easy and should be done.
  3. Don't allow users to type non-ascii characters into the comments box.
hakavlad commented 2 weeks ago

might be because the font doesn't support it.

No. For example, all popular fonts suppots basic non-ascii symbols like ё and —.

The problem occurs on both Windows and Linux.

but it might be Noto Sans

The problem is not that exotic characters are not supported. The most basic things are not supported!

I suppose it's possible to do something with the input encodings.

3 possible solutions

  1. Not works.
  2. Not a solution.
  3. Not a solution.
HACKERALERT commented 2 weeks ago

What do you think could fix it?

hakavlad commented 2 weeks ago

I'm not gopher. Maybe consult on SO or r/golang.

HACKERALERT commented 2 weeks ago

Go itself supports Unicode character in strings, I think it's just the UI library "dear imgui" that is having trouble.

hakavlad commented 2 weeks ago

Maybe related

unspecified font range defaults to minimal latin range, it does not include all characters provided by font.

https://github.com/ocornut/imgui/issues/2233

hakavlad commented 2 weeks ago

see https://pkg.go.dev/github.com/allendang/imgui-go#Font and further

hakavlad commented 2 weeks ago

see also https://github.com/inkyblackness/imgui-go/issues/123#issuecomment-692470183

HACKERALERT commented 2 weeks ago

Not a big priority imo