News for hackers. Stuff that matters.
Re:Show HN: Coding Font – A game to find your favorite codin... by asciimov on Wednesday October 27, 2021 @10:09AM (#29013470)
I like the idea. Some thoughts:

- Center the code samples on the page. So that your not unintentionally one over the other due to differences in viewing angle and vision ability.

- Make all the fonts equal in height regardless of font point. Knee jerk reaction will be to go with the font that is closest to a persons normal preference.

- Hide Font names and size/points.

- Light theme and other color options.

- Other programming language options.

- jiI1l0O test. I like to see those characters that can often be too similar in shape shown together.

- Controversial, throw in some non mono-spaced fonts.

Re:Show HN: Coding Font – A game to find your favorite codin... by jordanpg on Wednesday October 27, 2021 @12:30PM (#29015505)
Also consider hiding the font names. Too much bias from certain familiar keywords (JetBrains, IBM, courier, etc.).
Re:Show HN: Coding Font – A game to find your favorite codin... by quaintdev on Wednesday October 27, 2021 @02:55PM (#29017513)
Please do this.
Re:Show HN: Coding Font – A game to find your favorite codin... by skneko on Wednesday October 27, 2021 @02:58PM (#29017541)
There is a "blind mode" that hides the font names.
Re:Show HN: Coding Font – A game to find your favorite codin... by wentin on Wednesday October 27, 2021 @03:44PM (#29018161)
Yes, try the blind mode button, I just added it!
Re:Show HN: Coding Font – A game to find your favorite codin... by zapzupnz on Wednesday October 27, 2021 @06:04PM (#29019689)
The name isn't intuitive. A description of the function would be better. "Hide font names".
Re:Show HN: Coding Font – A game to find your favorite codin... by hawkesnest on Wednesday October 27, 2021 @11:45AM (#29014826)
> jiI1l0O test. I like to see those characters that can often be too similar in shape shown together.

This is a big one for me. None of the sample text had a capital O to compare to 0.

Re:Show HN: Coding Font – A game to find your favorite codin... by a_e_k on Wednesday October 27, 2021 @01:41PM (#29016492)
When I developed my own coding font (Luculent), the compact sample that I ultimately came up with was:

    //  The five boxing wizards jump
    #include <stdio.h> // <= quickly.
    int main(int argc, char **argv) {
      float il1[]={1-2/3.4,5+6==7/8};
      int OxFaced=0xBAD||"[{(CQUINE";
      unsigned O0,l1,Z2,S5,G6,B8__XY;
      printf("@$Hamburgefo%c`",'\n');
      return ~7&8^9?0:l1|!"j->k+=*w";
    }
It has a pangram, lots of confusable pairs of characters adjacent to each other, opening brackets next to each other and near a pipe character, quotes and commas next to each other, lining operators (i.e., ->, += and <=), and every normal punctuation character on a US keyboard. It also happens to be a valid, though useless, C or C++ program.
Re:Show HN: Coding Font – A game to find your favorite codin... by Fwirt on Wednesday October 27, 2021 @01:57PM (#29016696)
Thanks for the name drop! Luculent looks like a nice font that checks all the boxes. I'd like to see it added to this project as well.
Re:Show HN: Coding Font – A game to find your favorite codin... by captaincrisp on Friday October 29, 2021 @04:06PM (#29042975)
Recently I've noticed I have an issue distinguishing 8 from 0 with some dotted zero fonts. That'd be a nice one to see also.
Re:Show HN: Coding Font – A game to find your favorite codin... by GordonS on Wednesday October 27, 2021 @02:09PM (#29016848)
Another idea is to synchronise scrolling within the code samples, so if I scroll in one, the other automatically scrolls to the same line.
Re:Show HN: Coding Font – A game to find your favorite codin... by fouc on Wednesday October 27, 2021 @02:41PM (#29017314)
> - Make all the fonts equal in height regardless of font point.

I like the current scheme which keeps the line height or px equal I'm guessing. So this should be a toggle-able option.

Another feature request: It'd be nice to compare the overall width of each font in terms of having 80 or 100 or 120 character limits on width. I'm always wondering what font is the best for viewing two files side-by-side on a 1280x800 display.

Re:Show HN: Coding Font – A game to find your favorite codin... by rbates on Wednesday October 27, 2021 @12:42PM (#29015704)
A couple more suggestions:

- Option to lock scrolling so they both scroll at the same time.

- Button to flip them in place to help see the differences.

Re:Show HN: Coding Font – A game to find your favorite codin... by layer8 on Wednesday October 27, 2021 @02:21PM (#29017021)
- Add uppercase characters (lowerCamelCase, UpperCamelCase, ALL_CAPS). The sample code contains uppercase characters only in the font names.

- Allow line-height adjustment.

- Add Lucida Console (still my favorite coding font at 8 px cap height). :)

Re:Show HN: Coding Font – A game to find your favorite codin... by zem on Thursday October 28, 2021 @01:21AM (#29022656)
i was pretty impressed that my final pair ended up being fira code and fira mono, so i tried switching my terminal font from bitstream vera sans mono. it looked markedly worse - i switched back within a couple of minutes. i think your point about the displayed text size affecting my judgement is spot on.
Re:Show HN: Coding Font – A game to find your favorite codin... by Osiris on Wednesday October 27, 2021 @11:58AM (#29015007)
Include proportional fonts.

I know I'm not the only one that uses one. Specially I use Input which has both mono and proportional versions and designed for programming.

Re:Show HN: Coding Font – A game to find your favorite codin... by Stratoscope on Wednesday October 27, 2021 @04:59PM (#29019043)
You are not the only one. I've used proportional fonts exclusively for 10-15 years and will never go back to monospaced.

In the past I used Verdana, Georgia, and Trebuchet MS. That last one may seem like an odd choice, but I really like the way it renders on a high-DPI display, with thick readable strokes and easily distinguished "confusable" characters.

Trebuchet MS does have some flaws, so I started customizing it into what I call Trebuchet++. What got me started on this was the poor tilde in TMS. I swapped in a better one with FontForge, and then started experimenting with a few other things.

One thing that bothered me in particular about proportional fonts is that the underscore character is so much wider than a period. This creates the wrong visual grouping in something like this:

name_with_underscores.method_with_underscores()

The default spacing causes "underscores.method" to be bound tighter visually than the individual names on each side.

So I edited the underscore to add negative spacing while keeping the underscore itself fairly wide. And I added positive spacing around the period. This makes it more clear visually that "name_with_underscores" and "method_with_underscores" are individual names separated by the dot.

The next tweak I plan on is adding some positive spacing after a "(" and before a ")" and similarly with [] and {}. It makes me sad that modern coding standards prohibit spaces inside (), [], and {}, even though it makes so much sense logically to have spaces inside them.

If I can't fix my company's mandatory code formatter, at least with a proportional font I can adjust it to put just a bit of whitespace there.

Re:Show HN: Coding Font – A game to find your favorite codin... by fire on Thursday October 28, 2021 @02:21AM (#29022993)
Do you have the font or your modification scripts up on github?
Re:Show HN: Coding Font – A game to find your favorite codin... by Stratoscope on Thursday October 28, 2021 @09:57AM (#29026186)
I don't have it on GitHub, mostly for worry over Microsoft's copyright on Trebuchet MS. I may get brave and post it anyway!

In the meantime, if you drop me an email (address is in my profile) I will be happy to send you a copy of the FontForge project and the compiled .ttf font.

Re:Show HN: Coding Font – A game to find your favorite codin... by arnsholt on Wednesday October 27, 2021 @01:50PM (#29016614)
There are dozens of us I tell you, dozens! In my case I saw the light after two years of programming in SmallTalk, where our dev images shipped with Cambria by default.
Re:Show HN: Coding Font – A game to find your favorite codin... by jcuenod on Wednesday October 27, 2021 @01:10PM (#29016077)
Also samples with:

- ligatures

- italics

Re:Show HN: Coding Font – A game to find your favorite codin... by elfchief on Wednesday October 27, 2021 @01:12PM (#29016096)
I came here to say exactly this. Ligatures make a -huge- difference to me, please offer some example text that makes use of them.

Also, please make it an option to hide the font names so that it is a true blind comparison.

Awesome idea, though!

Re:Show HN: Coding Font – A game to find your favorite codin... by wentin on Wednesday October 27, 2021 @02:49PM (#29017425)
Great idea! I took it and implemented it, now there is a toggle button to turn on “Blind Mode”

Try it out!

Re:Show HN: Coding Font – A game to find your favorite codin... by wentin on Wednesday October 27, 2021 @03:45PM (#29018176)
I am going through the suggestion list and implementing them. The blind mode is just added!