eigilnikolajsen / commit-mono

Commit Mono is an anonymous and neutral programming typeface.
https://commitmono.com/
1.14k stars 15 forks source link

Smart case not perfectly smart #39

Closed haarp closed 10 months ago

haarp commented 10 months ago

Hey,

I found an interesting issue that is reproducible on the commitmono.com page.

So it seems Smart case doesn't react properly when bordered by letters.

Cheers!

eigilnikolajsen commented 10 months ago

Good call! This is actually due to the fact that the v next to [ is lowercase where as ; is neutral. I will try to add some logic so this doesn't happen.

eigilnikolajsen commented 10 months ago

This should be fixed in the latest release. However, I have a feeling that there could be more issues out there, so I will try to fine tune it again later.

haarp commented 10 months ago

Thanks. However something seems to be broken now, rendering went bonkers in my text editor (xed) using a custom version. Bold and Bold-Italic seem less affected. It looked fine on the website.

Screenshot: Screenshot_2023-09-07_11-25-30

Settings CommitMono_custom-settings.json.zip

eigilnikolajsen commented 10 months ago

That looks super weird. When I download the font with the custom settings you attached, I see nothing wrong with them. Can you send your font files, so I can check them?

haarp commented 10 months ago

Wait, it seems the problem was my editor. It seems to dislike replacing font files while it's running. Looks fine after restarting it. Sorry for the false alert!

As for Smart Case: Judging by the website, it now doesn't modify [ or ] at any location in the C++ example. Consistency :)

I notice something in the Python example however. In % 2 == 0 and the == gets raised, (x == 1): it's not.

eigilnikolajsen commented 10 months ago

Okay, case closed haha. The Python example is intentional. Since x is lowercase the == follows its case rather than the case of 1.

haarp commented 10 months ago

Ah, gotcha. Thanks for your time and thanks for making this font!

nmsmith commented 3 months ago

The smart casing for brackets/parens/braces is still very clunky, IMO. It's easy to end up with a pair of brackets that are vertically misaligned. If the brackets are close together, this misalignment is noticeable.

It could be worthwhile splitting the smart case feature into two parts:

  1. Smart case for brackets
  2. Smart case for "everything else"

IMO, only the latter feature should be selected by default on the website, because it is only one that is robust.