Live data from Hacker News

Input: Fonts for Code

input.fontbureau.com

11–20 of 44 posts

Re: Input: Fonts for Code

#12
Scanning over the page and the 'explanation' page, I found a headache developing as I tried to read everything there.

My experience so far is that I find this far harder to read. For reference's sake, I don't do parameter alignment in my own code (see Stratoscope's comment), but still find it easy to scan code in most-any monospace, probably because my eyes just know where to jump to all the time...

For all the words in favour of proportional fonts, I would venture that when the words on a page are in fact ultimately forming macroscopic symbols (identifiers), often with PascalCase or camelCase or underscore_words, uniformity no matter the characters used is perhaps a more useful feature than making the words easily comparable to those read in prose?

Re: Input: Fonts for Code

#13
On the info page:

""" M

M

M

M

proportional fonts can make it easier to spot typos """

The example given demonstrates that a certain subset of typos can be caught using proportional fonts, but not all.

If a word has too many or too few characters in it, I think you are more likely to spot it utilising a monospaced font.

EDIT: the quote has been made more legible.

Re: Input: Fonts for Code

#14
post #9

Maybe this is the place to ask about my pet peeve - why do fonts, including specialized coding fonts, position parenthesis with both sides equally? I mean, it seems that for readability it would be better to emphasize the fact that they're asymmetrical - when looking at "foo(bar)baz" , it would be better if the parens would be a pixel or so closer to their inner contents; but currently "foo(bar" on most fonts looks a…

Fonts do it because outside of code there is just always a space character inserted before every parenthesis. Adding additional space inside the parenthesis character would just increase that space, something that is not desirable.

Re: Input: Fonts for Code

#15
post #3
post #2

Totally subjective opinion, but yet to see something beat Consolas.

I actually prefer Ubuntu Mono over Consolas or Inconsolata but fonts are a very subjective thing. :)

On my Macbook I've tried many many coding fonts, yet Ubuntu Mono is actually the best. All others either seem to render weird to me or I don't like their look in the first place.

Re: Input: Fonts for Code

#18
post #14
post #9

Maybe this is the place to ask about my pet peeve - why do fonts, including specialized coding fonts, position parenthesis with both sides equally? I mean, it seems that for readability it would be better to emphasize the fact that they're asymmetrical - when looking at "foo(bar)baz" , it would be better if the parens would be a pixel or so closer to their inner contents; but currently "foo(bar" on most fonts looks a…

Fonts do it because outside of code there is just always a space character inserted before every parenthesis. Adding additional space inside the parenthesis character would just increase that space, something that is not desirable.

The topic is developer-oriented specialized fonts - so there is no such thing as 'outside of code', and in a monospaced font no space can be added since the width is fixed - so my question was about shifting the parenthesis towards the 'inside' within that width.

Re: Input: Fonts for Code

#20

Wow, I never thought I would see proportional fonts specifically designed for coding. I've coded almost exclusively in proportional fonts for over ten years. The font I use the most is Georgia. It makes code easier to read and more pleasing to the eye, just like any other text. Besides personal preference, I think there are two main reasons people avoid proportional fonts: column alignment and two-space indents. Two-…

I would say that the problem is "SomeReallyFancyTypeName" where you've created a ridiculously long type name (one of the reasons I avoid Windows programming at all costs).

That aside, editors don't handle tabbing very well. It's far more space-efficient to insert two tabs instead of 8 spaces, but space and bandwidth are so cheap these days, no one can be arsed to fix what is viewed as a minor problem (use enough spaces and sooner or later, we're talking real bandwidth).

Then, there's the moment where we have to decide what those all those tabs (and sometimes spaces) mean, depending on the language, the layout rules, personal preferences, etc. For example, some people write Python with 2 spaces at the beginning of a line (which is plainly heresy). Others write it with 4 spaces (which is damnable blasphemy). Which is right?

And how many other languages are like this?(hint: any language in which layout is indented for any reason)

And concerning line length - what's the maximum allowable length before wrapping? You say 80, I say 132 (sometimes more), but I run terminal in a full-screen mode with 13-pt type, single-screened, never side-by-side.

Personally, I've learned my lesson. I'm waiting for editors to smarten up before I muck around with proportional fonts for code. Again.

Post reply on HN