Hack icon indicating copy to clipboard operation
Hack copied to clipboard

Wider `<` [U+003C] and `>` [U+003E]

Open jdw1996 opened this issue 6 years ago • 10 comments

This continues the discussion from issue #120.

Tonight I created wider versions of < [U+003C] and > [U+003E]. Here's a screenshot to give an idea of what the new versions look like.

screenshot_2018-03-14_21-32-01

I'm going to try them out over the next little while and will post more screenshots if I don't see anything that needs more tweaking. In case anyone is interested in building a version of the font with these glyphs, I'll attach the source for them.

new-lt-gt.zip

jdw1996 avatar Mar 15 '18 01:03 jdw1996

I meant to post some rationale behind the change before, but it slipped my mind.

There are lots of ways that different languages use < and >:

  • Comparison operators (<, >, <=, >=)
  • Bit-shift operators, and stream operators in C++ (<<, >>)
  • Arrows (e.g. my_object->call_fn(); in C)
  • Angle-brackets in XML and HTML (e.g. <p></p>)
  • Angle-brackets in templates (as in C++) and generics (as in Java) (e.g. List<String> los;)
  • Various other operators (e.g. <*>, <$>, >>= in Haskell) Plus, I'm sure, other uses I don't know about or don't use as much.

For some of these cases, the current, narrow < and > look good, but they seem a bit cramped for others, especially angle-brackets and bit-shift operators. This is an attempt to find a middle-ground that looks good in all cases.

jdw1996 avatar Mar 15 '18 03:03 jdw1996

Looks good Joseph. Thanks for this work! Can I ask you to post images of the old design vs. new design so that we can compare? You don't need to do anything fancy. Side by side or separate images are fine. This is the easiest way to understand the changes that you made in the design.

We can explore the source idioms in more detail using our source code corpora. Code blocks that use the glyphs here are searchable across multiple programming languages with the following:

https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/source-foundry/code-corpora%24+%5C%3E+file:%5C.%28c%7Ch%7Ccc%7Cpy%7Cgo%7Cjava%7Cjs%7Cphp%7Crb%29%24

https://sourcegraph.com/search?q=repo:^github.com/source-foundry/code-corpora%24+%3C+file:.(c|h|cc|py|go|java|js|php|rb)%24

I don't believe that we have Haskell source projects in there at the moment. Or HTML where there will be a big impact from design changes with these glyphs... It would be worth adding other languages where these glyphs occur commonly so that we can explore the adjacent glyph/space relationships in a bit more detail using actual blocks of code text. This will supplement the common use cases that you listed above. Let's see if we receive feedback from others who work outside of the languages that we generally use for testing.

Let's leave open for feedback as I work on the v4.000 release work. I hope to have this release out in the next month. Will return to this for a detailed review of these glyphs after that release. Tagging for v4.001 work.

chrissimpkins avatar Mar 15 '18 13:03 chrissimpkins

This is available if you would like to give the fonts different family names to install side by side and switch back and forth for comparisons:

https://github.com/chrissimpkins/fontname.py

chrissimpkins avatar Mar 15 '18 13:03 chrissimpkins

OK, I pulled together a few different examples of these characters in use and took screenshots. Here's the current font: original And my altered version: dev

These screenshots are taken in Vim on Xubuntu Linux, but I was using the modified version on my Windows machine at work today and the < and > looked right there too.

jdw1996 avatar Mar 16 '18 00:03 jdw1996

looked right

👍

LGTM. Thanks for the screenshots! Will be back to this soon. Let's see what feedback we get about the proposed changes.

chrissimpkins avatar Mar 16 '18 00:03 chrissimpkins

Awesome, sounds good.

jdw1996 avatar Mar 16 '18 00:03 jdw1996

The associated pull request in the alt-hack repository is here: https://github.com/source-foundry/alt-hack/pull/37

jdw1996 avatar Mar 27 '18 01:03 jdw1996

Merged! Thanks Joseph!

chrissimpkins avatar Mar 27 '18 13:03 chrissimpkins

v4.000 pushed back a bit. I am going to add these changes on as part of the v4.000 release. Milestone updated.

chrissimpkins avatar May 18 '18 16:05 chrissimpkins

https://github.com/source-foundry/Hack/pull/434 with these changes was merged to dev branch and will be included in the v4.000 release of Hack.

chrissimpkins avatar Jun 11 '18 00:06 chrissimpkins