Live data from Hacker News

Monospaced Programming Fonts with Ligatures

hanselman.com

71–80 of 246 posts

Re: Monospaced Programming Fonts with Ligatures

#71
post #55

> I frankly can't understand how tiny font people can function. It gives me a headache to even consider programming at anything less than 14 to 16pt and I am usually around 20pt. What? I can't understand how such large font people can function. I mean, how large (or dense) are your screens? Is that a Macbook thing? I'm at... something small. Hard to tell exactly, because on my laptop screen, all following fonts look…

What are you going to do when you get older and your eyes go through "the change"? You can keep your font sizes and wear readers, but then don't you have to move your head a lot to view the entire magnified image? Any presbyopic developers care to chime in on what the experience is like? I'm 40, so mine could cross over any time now. I hate 16:9 too. Please give me back the bottom of my screen that you chopped off.

> I'm 40

Well, heck, you shouldn't be programming at all. You're much too old.

(And in case your irony detector is broken, I'm 52.)

Re: Monospaced Programming Fonts with Ligatures

#72
post #35
post #33

Apparently I'm one of the two users of proportionality spaced fonts for coding. I've used this now for five years and I don't understand why developers still see this need to code as if monospaced terminals is all that's available. Especially on large screens with high dpi it reads much faster. It also makes it less awkward to use editor unicode substitution for display purposes.

If like me you really like aligning your code proportional fonts are not exactly pleasant to use. I sometimes go out of my way (within reason) to have variables with the same number of letters so that I can align them nicely. A bane of my existence is that "width" and "height" don't have the same number of letters. An example from some lua code I'm working on at the moment: local hi = buffer:bitfield(4, 4) local lo =…

I'm normally using Optima when working on Retina displays (because of serif typeface). Screenshot [1] of some old project for solving Project Euler problems (no solutions can be found in the screenshot).

[1] http://imgur.com/a/JiYhD

Re: Monospaced Programming Fonts with Ligatures

#73

Earlier quoted context omitted.

It transforms them from individual characters being put together to approximate symbols into the actual symbols. The act of joining together particular character combinations into more aesthetically pleasing forms is common and very old practice. It looks odd only because we're accustomed to seeing the individual characters due to display limitations inherited from typewriters and TTY machines.

I agree, except for the www ligature. It just looks odd to only have part of a domain name compressed.

www was unnerving to me (and a couple of my team members) too.

In a way I am interested in psychological basis for my innate rejection of this. Conceptually, I comprehend why it is made into it's own ligature, like !=, it is a unit of information these days.

Re: Monospaced Programming Fonts with Ligatures

#74

> I frankly can't understand how tiny font people can function. It gives me a headache to even consider programming at anything less than 14 to 16pt and I am usually around 20pt. What? I can't understand how such large font people can function. I mean, how large (or dense) are your screens? Is that a Macbook thing? I'm at... something small. Hard to tell exactly, because on my laptop screen, all following fonts look…

Given differences in monitor pixel densities, OS zoom levels, and distance from eyes to monitor, comparing any point/em/etc measure is practically worthless.

For example, I can use a 12pt font on my macbook pro's screen, but have to go up to 16pt on my 4k display at home, and down to 9 or 10pt on the 1920x1024 screens in the office. It's a pain, but...

Instead, if you really want to compare font sizes, compare either the height relative to the window, or actual size on a ruler held at arms length while at normal viewing distance. That way you can measure the arc-height of the font - something that translates much better with such a wide variance in displays.

My fonts, corrected for device, all end up being around 1/8" ( tall (for capital letters) on a stick held at arms length.

Re: Monospaced Programming Fonts with Ligatures

#75
post #15

I like switching fonts every couple of years just to keep it fresh. My font right now is Iosevka: https://be5invis.github.io/Iosevka/ A font generated from its source code. You can build your own variant. It has ligatures as well. I like that it’s not as wide as many other monospace fonts.

My problem with Iosevka (and Input and others like them) is that the [x-height][0] is too large, ie the bottom-half parts are too tall compared to the top-half and uppercase letters. Especially in less-wide weights, it feels muddy and hard to distinguish.

[0]: https://en.wikipedia.org/wiki/X-height

Re: Monospaced Programming Fonts with Ligatures

#76
Honeslty, this should be handled by the language itself. If a language supports unicode, why not support ≠ for not-equals instead of "!="? Then provide a pre-processor that will replace all your ugly "!=" with the correct mathematical symbol.

Re: Monospaced Programming Fonts with Ligatures

#77
post #63

> I frankly can't understand how tiny font people can function. It gives me a headache to even consider programming at anything less than 14 to 16pt and I am usually around 20pt. What? I can't understand how such large font people can function. I mean, how large (or dense) are your screens? Is that a Macbook thing? I'm at... something small. Hard to tell exactly, because on my laptop screen, all following fonts look…

Rotate your monitor 90 degrees. Or even better, get two monitors and have one rotated, and one normal. It ends up looking like a rotated T. Code and web browsing (which is really just walls of text) goes on the tall one, everything else on the other one.

This is my solution at work; I love it. The only caveat is that some font smoothing doesn't work as well on rotated monitors, since the pixels are no longer arranged as expected. Of course, with 4k monitors, it's a non issue (not that I can even realistically drive 2x 4k monitors on my MBP.

Re: Monospaced Programming Fonts with Ligatures

#78
post #33

Apparently I'm one of the two users of proportionality spaced fonts for coding. I've used this now for five years and I don't understand why developers still see this need to code as if monospaced terminals is all that's available. Especially on large screens with high dpi it reads much faster. It also makes it less awkward to use editor unicode substitution for display purposes.

After programming in SmallTalk for a while, I'm starting to come round to a similar point of view. I haven't quite made the leap in my day-to-day work yet, but I really am considering it. Another thing I'm considering to adopt from ST is dropping syntax highlighting. If research on highlighting for natural language can be transferred to code (I'm not entirely sure, but I suspect it might), highlighting might actually…

> If research on highlighting for natural language can be transferred to code (I'm not entirely sure, but I suspect it might), highlighting might actually be harmful to comprehension.

Interesting. Could you share some of that research and its conclusions?

Re: Monospaced Programming Fonts with Ligatures

#79
post #63

> I frankly can't understand how tiny font people can function. It gives me a headache to even consider programming at anything less than 14 to 16pt and I am usually around 20pt. What? I can't understand how such large font people can function. I mean, how large (or dense) are your screens? Is that a Macbook thing? I'm at... something small. Hard to tell exactly, because on my laptop screen, all following fonts look…

Rotate your monitor 90 degrees. Or even better, get two monitors and have one rotated, and one normal. It ends up looking like a rotated T. Code and web browsing (which is really just walls of text) goes on the tall one, everything else on the other one.

I do that at work. Thank God for screens with pivot.

Re: Monospaced Programming Fonts with Ligatures

#80
post #76

Honeslty, this should be handled by the language itself. If a language supports unicode, why not support ≠ for not-equals instead of "!="? Then provide a pre-processor that will replace all your ugly "!=" with the correct mathematical symbol.

agree except for the pre-processor part which should belong to the editor macro or keyboard shortcut space.
Post reply on HN