News for hackers. Stuff that matters.
Re:Ask HN: Anyone using proportional fonts for coding? by iefbr14 on Saturday July 29, 2023 @08:00AM (#36919386)
Good luck with positional languages :)
Re:Ask HN: Anyone using proportional fonts for coding? by rpastuszak on Saturday July 29, 2023 @12:14PM (#36921659)
Care to elaborate?
Re:Ask HN: Anyone using proportional fonts for coding? by iefbr14 on Saturday July 29, 2023 @01:17PM (#36922377)
Take cobol. The data division is highly column based, not mandatory though but you never get any of the columns straight except the first one. It will work but its hard on the eyes. Take (ibm) assembler, it sometimes needs a continuation character in column 72. Where is column 72 in proportional?
Re:Ask HN: Anyone using proportional fonts for coding? by rpastuszak on Saturday July 29, 2023 @01:29PM (#36922486)
hehe, I can live with that, I punch my cards by hand like a true 10x engineer.
Re:Ask HN: Anyone using proportional fonts for coding? by CoastalCoder on Saturday July 29, 2023 @11:11PM (#36927438)
Punch cards??? Luxury!

Why, when I was a lad, we had to punch paper tape by hand! And it wasn't any of this buy-it-by-the-roll stuff either. My da' would send me to the woods, and I'd have to chew a branch for a week to make my own paper!

Re:Ask HN: Anyone using proportional fonts for coding? by wredue on Saturday July 29, 2023 @11:19PM (#36927490)
Back in my day we had real man’s trees rather than the silly “programmer” soft lad trees. It took us a MONTH to chew our punch cards.
Re:Ask HN: Anyone using proportional fonts for coding? by bratgpttamer on Sunday July 30, 2023 @11:07AM (#36931913)
Real Programmers don't use punch cards; they toggle the programs in directly via front-panel switches (in octal).
Re:Ask HN: Anyone using proportional fonts for coding? by CoastalCoder on Sunday July 30, 2023 @12:59PM (#36933267)
Oh, we're talking about real programmers?

Well, real programmers just tweak the bias voltages on the op-amps driving the transistor networks.

And not using the potentiometers that today's "real programmers" use. No sir, when I was a lad...

Re:Ask HN: Anyone using proportional fonts for coding? by chungy on Saturday July 29, 2023 @10:46PM (#36927313)
Re:Ask HN: Anyone using proportional fonts for coding? by overvale on Saturday July 29, 2023 @01:01PM (#36922189)
I use them from time to time. I'm not working on large codebases with collaborators, just my dotfiles and CSS and stuff. If I was auditing other people's code I don't think I'd want proportional fonts, simply because in code every character matters.
Re:Ask HN: Anyone using proportional fonts for coding? by nahuel0x on Saturday July 29, 2023 @10:34PM (#36927243)
If you use VS Code, the search results and file explorer text use a proportional font because you cannot change it. Is a long standing bug and is annoying.
Re:Ask HN: Anyone using proportional fonts for coding? by Kwpolska on Sunday July 30, 2023 @04:43AM (#36929185)
I wouldn't want monospace for the file explorer, since the benefits of monospace don't really matter for files, and proportional fonts take up less space. Being able to fit more text is also better when searching, and if you need to see stuff in the monospace font, you can open the file or open search in an editor.
Re:Ask HN: Anyone using proportional fonts for coding? by beezlewax on Monday July 31, 2023 @12:40AM (#36938877)
So write an extension?
Re:Ask HN: Anyone using proportional fonts for coding? by eviks on Saturday July 29, 2023 @10:39PM (#36927276)
If only there were a modern code editor that supported variable-width tabs that would maintain vertical alignment with variable-width fonts...
Re:Ask HN: Anyone using proportional fonts for coding? by seanmcdirmid on Sunday July 30, 2023 @12:00AM (#36927685)
With auto formatters that automate indenting (and disallow custom indenting), I don’t think that really matter anymore.
Re:Ask HN: Anyone using proportional fonts for coding? by eviks on Sunday July 30, 2023 @07:05AM (#36929939)
bad tools can't eliminate the import of good formatting
Re:Ask HN: Anyone using proportional fonts for coding? by cocodill on Saturday July 29, 2023 @10:52PM (#36927347)
nope.
Re:Ask HN: Anyone using proportional fonts for coding? by pico303 on Saturday July 29, 2023 @10:54PM (#36927356)
What are you, a monster?
Re:Ask HN: Anyone using proportional fonts for coding? by quickthrower2 on Sunday July 30, 2023 @05:37AM (#36929468)
I fell odd even seeing a filename in proportional within a normal paragraph.
Re:Ask HN: Anyone using proportional fonts for coding? by rpastuszak on Tuesday August 01, 2023 @07:19AM (#36954682)
Yes, how did you know? Here’s my portrait: https://www.potato.horse/about
Re:Ask HN: Anyone using proportional fonts for coding? by sangpal on Saturday July 29, 2023 @10:56PM (#36927365)
I used Input Sans for some time as my coding font. Most proportional fonts have a small <space> which makes it difficult to figure out alignment in code. Input Sans was the only font I found that was good in this regard.

I use vim keybinds and movement was too unpredictable to keep using as my main font. Now I'm back to a monospaced font.

Re:Ask HN: Anyone using proportional fonts for coding? by cacozen on Saturday July 29, 2023 @11:03PM (#36927394)
Try IAWritter DuoSpace: it’s a great mix between fixed width and proportional: https://ia.net/topics/in-search-of-the-perfect-writing-font
Re:Ask HN: Anyone using proportional fonts for coding? by CharlesW on Saturday July 29, 2023 @11:41PM (#36927600)
TLDR: 1,500 words on how iA created a variant of IBM Plex Mono with four 1.5X-width characters (m, M, w, W) because…well, it's not really clear.

And, they say, programmers use monospace fonts because it helps them catch typos. In reality, variable glyph widths make it easier to identify typos.

Re:Ask HN: Anyone using proportional fonts for coding? by mrunseen on Sunday July 30, 2023 @01:24AM (#36928110)
m, M, w, W, %, @ and i, l, ! (and so on) are the letters that create a challenge (or a room for creativity/individuality) ad they are so wide or so narrow. Wide letters often get cramped as they need to share se witdh as narrower letters. iA thought they could just modify those “extreme” glyphs to increase legibility (and readability)
Re:Ask HN: Anyone using proportional fonts for coding? by firewolf34 on Sunday July 30, 2023 @01:32PM (#36933691)
Clearly, the letters are badly designed. Latin writing system was not invented with coding in mind.

Perhaps we can design a new character system script specifically designed for ease of programming! I say we use Aurebesh. :)

Re:Ask HN: Anyone using proportional fonts for coding? by JohnFen on Monday July 31, 2023 @03:57PM (#36947940)
> Perhaps we can design a new character system script specifically designed for ease of programming!

I think APL already did this.

Re:Ask HN: Anyone using proportional fonts for coding? by JieJie on Sunday July 30, 2023 @12:20PM (#36932830)
The font is a modification of IBM's Plex open font, and is available here.

https://github.com/iaolo/iA-Fonts/

Re:Ask HN: Anyone using proportional fonts for coding? by kcartlidge on Monday July 31, 2023 @01:39AM (#36939156)
This. I use it all the time. Every character is fixed width except 'm', 'w', 'M', and 'W', which are 150%. It mostly looks and behaves like monospace, but with a very nice minor adjustment that makes it more readable and pleasant.
Re:Ask HN: Anyone using proportional fonts for coding? by jrm4 on Saturday July 29, 2023 @11:09PM (#36927429)
Broadly, it just seems weird that this appears to be such a difficult problem TODAY.

As in "Just tell the AI what code you want to write and the language and it will just magically do it for you" is like, sure, no problem, but we absolutely draw the line at "Use proportional fonts to make the code read nice on a page" because thats WAY TOO HARD

Re:Ask HN: Anyone using proportional fonts for coding? by nequo on Saturday July 29, 2023 @11:50PM (#36927643)
What is your proposed solution?
Re:Ask HN: Anyone using proportional fonts for coding? by jrm4 on Sunday July 30, 2023 @10:43PM (#36938255)
It feels as if there could be some "smart-ish" way to analyze and present source code with proportional fonts, but indent and move as needed.
Re:Ask HN: Anyone using proportional fonts for coding? by iimblack on Sunday July 30, 2023 @12:12AM (#36927733)
Even if you’re a heavy user of AI for coding you have to read what the AI wrote. Code isn’t like other writing where you can skim past letters and your brain will fill it in for you. In code, each character is significant with even the case of single letters being important. I think it makes sense to optimize for clarity. Additionally, vim keybindings are significantly more awkward on non-monospaced fonts.
Re:Ask HN: Anyone using proportional fonts for coding? by SoftTalker on Saturday July 29, 2023 @11:32PM (#36927561)
You'd probably have to use tabs to make your indented blocks and other alignment look nice. Then you get into the whole tabs vs. spaces debate.
Re:Ask HN: Anyone using proportional fonts for coding? by seanmcdirmid on Saturday July 29, 2023 @11:56PM (#36927668)
Why? Most companies are requiring auto formatters these days, so it doesn’t really matter if you can’t precisely align code.
Re:Ask HN: Anyone using proportional fonts for coding? by SoftTalker on Sunday July 30, 2023 @12:28AM (#36927807)
Really? I've never used an autoformatter for anything ever, much less had one required. Which companies are these?
Re:Ask HN: Anyone using proportional fonts for coding? by seanmcdirmid on Sunday July 30, 2023 @01:57AM (#36928289)
Google (I think they started the trend with Go?), Facebook, Amazon, … which companies “don’t” require auto formatters would be more interesting and specific.
Re:Ask HN: Anyone using proportional fonts for coding? by NBJack on Sunday July 30, 2023 @09:42AM (#36931062)
Google leaves that as a team preference. Go certainly has highly opinionated style enforcement, but it is surprisingly not automatic formatting across the board.

Amazon may have changed, but this is also not universal. Team preference, though they may be enforcing it in the older code base for the site (i.e. detail pages, etc.).

Facebook is the only one on your list I can confirm does, in part perhaps due to the predominant language (Hack).

Re:Ask HN: Anyone using proportional fonts for coding? by hollerith on Monday July 31, 2023 @01:27PM (#36945977)
I'm curious what line-length limits these company's have (either imposed by an autoformatter or imposed by informal means).
Re:Ask HN: Anyone using proportional fonts for coding? by Renevith on Saturday July 29, 2023 @11:44PM (#36927615)
I've used Input Sans for years. I was expecting to have to deal with alignment issues but in my Java codebase there were almost none. (YMMV depending on language and coding style.) The only alignment we use is with leading spaces only, so everything still aligns as expected. The readability is great and I can fit substantially more characters horizontally than I could with a fixed-width font.

It definitely felt weird at first, like I was reading code that somebody had pasted into Microsoft Word. But that passed and now it's all upside.

I screen-share my IDE from time to time and I've never had anyone comment on it.

Re:Ask HN: Anyone using proportional fonts for coding? by nielsbot on Sunday July 30, 2023 @07:25PM (#36937083)
Same here. I find it much more legible. I can also finally move beyond the teleprinter and vintage terminal screen legacy of monospaced fonts. I’m a person not a robot :)
Re:Ask HN: Anyone using proportional fonts for coding? by seanmcdirmid on Saturday July 29, 2023 @11:55PM (#36927663)
I’ve used proportional fonts for more than a decade now. Since auto formatters disallow ascii art or custom alignment anyways, I’m honestly not missing out on anything, and just get to enjoy kerning in my code. I use whatever sans serif is used most on my platform (ATM it’s google sans), using a serif want would probably annoy me a lot.

Oh, what we are really missing are code-oriented ligatures, like -> or ==>. Sad, but I find fixed width so bothering that I’m not willing to try the fixed width fonts that offer such ligatures.

Re:Ask HN: Anyone using proportional fonts for coding? by hyperhopper on Sunday July 30, 2023 @12:05AM (#36927710)
> Since auto formatters disallow ascii art or custom alignment

This is not a universal truth. I've worked at faang companies that don't even do this.

In fact many great comments I've seen have been ASCII art diagrams. Those should be encouraged.

Re:Ask HN: Anyone using proportional fonts for coding? by seanmcdirmid on Sunday July 30, 2023 @02:15AM (#36928383)
I haven’t seen any such in the last five years. Maybe C or C++ code? Java and kotlin auto formatters are pretty entrenched at this point, Python always has been, not sure about other language cultures.
Re:Ask HN: Anyone using proportional fonts for coding? by eternityforest on Monday July 31, 2023 @01:42AM (#36939178)
I did not know till I saw this comment how many ascii art and even diagram tools existed for vs code! I will probably be making use of some!
Re:Ask HN: Anyone using proportional fonts for coding? by LorenDB on Sunday July 30, 2023 @05:52PM (#36936394)
Hot take: ligatures bother me nearly as much as a proportional for would bother me.
Re:Ask HN: Anyone using proportional fonts for coding? by seanmcdirmid on Sunday July 30, 2023 @06:18PM (#36936574)
Sure, I mean if non-type writer fonts bother you, I’m sure other aspects of modern typography would also be off putting.
Re:Ask HN: Anyone using proportional fonts for coding? by xigoi on Monday July 31, 2023 @04:01AM (#36939881)
This is a cold take. Many people on HN hate ligatures.
Re:Ask HN: Anyone using proportional fonts for coding? by psd1 on Monday July 31, 2023 @04:31AM (#36940070)
A "hot take" is an initial reaction, without benefit of much data or consideration.

Like when someone shouts to you after they've already thrown, and you must turn and catch in a fraction of a second. Or take a ball to the jaw.

You've expressed a considered preference, not a hot take.

Re:Ask HN: Anyone using proportional fonts for coding? by CharlesW on Saturday July 29, 2023 @11:57PM (#36927670)
I propose we start the revolution with comment blocks.

https://developer.apple.com/library/archive/documentation/Xc...

Re:Ask HN: Anyone using proportional fonts for coding? by metadat on Sunday July 30, 2023 @12:00AM (#36927687)
What is the colon (:) thing about?

E.g.

    /*:
       Some comment
     */
Is there a legitimate reason for the non-C addition atop a C-syntax?
Re:Ask HN: Anyone using proportional fonts for coding? by thristian on Sunday July 30, 2023 @12:35AM (#36927840)
It seems to be a convention that means "this comment contains Markdown and should be rendered in the generated documentation" as opposed to commenting out unused code or whatever.
Re:Ask HN: Anyone using proportional fonts for coding? by nyolfen on Sunday July 30, 2023 @12:50AM (#36927909)
it's to mark the comments in these blocks to be extracted for formatted documentation generation rather than conventional code comments
Re:Ask HN: Anyone using proportional fonts for coding? by Someone on Monday July 31, 2023 @03:10PM (#36947374)
Weirdly, it doesn’t seem to be DocC (https://developer.apple.com/documentation/docc)
Re:Ask HN: Anyone using proportional fonts for coding? by zabzonk on Sunday July 30, 2023 @12:17AM (#36927762)
stroustrup switched to using a proportional font in TC++PL 3rd ed. i really didn't like it, but i know quite a few people did. all comes down to taste as far as rendering is concerned, i suppose. but the program text must be able to be rendered in either a fixed or a proportional font, and look sensible in either. and that is not so easy.
Re:Ask HN: Anyone using proportional fonts for coding? by Kwpolska on Sunday July 30, 2023 @04:48AM (#36929211)
It's very easy if you don't align things (e.g. try to keep the = in multiple assignments in the same column) and use a fixed width (1 tabstop?) for continuation lines.

Or, if you are typesetting a book, you can do alignment in the typesetting software instead of adding spaces.

Re:Ask HN: Anyone using proportional fonts for coding? by jwells89 on Sunday July 30, 2023 @12:51AM (#36927919)
I've tried a few times over the years but it never sticks. Proportional fonts make scanning for character-level differences slower and most don't distinguish important characters strongly enough (e.g. parens and brackets taking less space than alphanumerics). I'll echo others' comments on alignment too.

To my eye, they also just make code look… I don't know, messy somehow? Especially with serifs it looks like a tractor trailer wrecked and spilled its payload of characters all over the place.

Re:Ask HN: Anyone using proportional fonts for coding? by hackinthebochs on Sunday July 30, 2023 @12:53AM (#36927933)
I switch between golang's proportional font and Nirmala UI. They look really good on high dpi screens and are just generally attractive fonts. Indentation width is a drawback since space characters tend to be small. Code that uses two spaces for indentation is not nearly enough of an offset in my opinion. Four space indentation looks like two space for a monospace font, which is generally good enough. Also punctuation can be an issue as proportional fonts tend to have small, easy to miss punctuation.
Re:Ask HN: Anyone using proportional fonts for coding? by jdougan on Sunday July 30, 2023 @03:06AM (#36928618)
Use tabs to left indent, and you can then use whatever spacing you want for readability.
Re:Ask HN: Anyone using proportional fonts for coding? by jitl on Sunday July 30, 2023 @12:53AM (#36927934)
My dad does, which used to drive me nuts when I wanted to help him out when I was in college. These days I think it sounds like a good idea but I haven’t tried it yet.

I bet it would traumatize some of my VIM diehard teammates.

Re:Ask HN: Anyone using proportional fonts for coding? by Pxtl on Sunday July 30, 2023 @12:59AM (#36927968)
This should be workable and reasonable if you use tabs to indent and don't do any alignment. Imho that's good practice but there's always somebody stubborn.
Re:Ask HN: Anyone using proportional fonts for coding? by akkartik on Sunday July 30, 2023 @01:06AM (#36928007)
Yes, but my workflow is very unconventional: https://www.youtube.com/watch?v=aD6vmbmzdBo
Re:Ask HN: Anyone using proportional fonts for coding? by kevin_thibedeau on Sunday July 30, 2023 @01:07AM (#36928013)
They preclude ASCII and Unicode diagrams.
Re:Ask HN: Anyone using proportional fonts for coding? by rhn_mk1 on Sunday July 30, 2023 @01:34AM (#36928160)
They preclude ASCII, but not Unicode diagrams.

Unicode block characters have constant width.

Unicode also contains fixed-width equivalents to ASCII letters: abc. Just add 0xFEE0 to the code point.

And 0x3000 is an ideographic space, with the same width.

    +---------+
    |         |                        +--------------+
    |   NFS   |--+                     |              |
    |         |  |                 +-->|   CacheFS    |
    +---------+  |   +----------+  |   |  /dev/hda5   |
                 |   |          |  |   +--------------+
turns into

    +---------+
    |         |                        +--------------+
    |   NFS   |--+                     |              |
    |         |  |                 +-->|   CacheFS    |
    +---------+  |   +----------+  |   |  /dev/hda5   |
                 |   |          |  |   +--------------+
EDIT: which would have looked much better had HN not replaced full spaces with the narrow kind.
Re:Ask HN: Anyone using proportional fonts for coding? by Kwpolska on Sunday July 30, 2023 @04:52AM (#36929238)
Those diagrams might look nice, but are hard to edit (for your average user without a CJK input method) and hard to copy things from (you can't get the string /dev/hda5 from your example, you'll get something Linux won't do anything meaningful with.)
Re:Ask HN: Anyone using proportional fonts for coding? by rhn_mk1 on Sunday July 30, 2023 @10:12AM (#36931306)
I don't think diagrams are meant to be copy-pasted from a lot, so I'm not worried about that.

For editing, I'd just use a conversion tool, and edit it in a fixed-width editor rather than directly in code. Yes, it's an extra tool, but I don't think it's that outlandish to edit pictures in a tool for editing pictures.

Re:Ask HN: Anyone using proportional fonts for coding? by hollerith on Monday July 31, 2023 @01:32PM (#36946042)
My experience is that I get annoyed when text isn't copyable whether or not someone means for it to be copyable.
Re:Ask HN: Anyone using proportional fonts for coding? by kazinator on Monday July 31, 2023 @01:09AM (#36939017)
... but issues would never happen outside of HN, so this is all cool.
Re:Ask HN: Anyone using proportional fonts for coding? by retrocryptid on Sunday July 30, 2023 @01:52AM (#36928265)
I know ThinkPascal back in the day used a proportional font, but I think I remember MPW using mono. My CanonCat uses a proportional font when you write FORTH programs for it.
Re:Ask HN: Anyone using proportional fonts for coding? by _moof on Sunday July 30, 2023 @01:59AM (#36928299)
Was just going to mention THINK Pascal. It used 9-point Geneva, and bolded keywords, if I remember correctly.
Re:Ask HN: Anyone using proportional fonts for coding? by retrocryptid on Sunday July 30, 2023 @02:11PM (#36934196)
Yup. That's the one I'm thinking about. Oh. And an early version of MS BASIC for Mac did something similar.
Re:Ask HN: Anyone using proportional fonts for coding? by jdougan on Sunday July 30, 2023 @02:35AM (#36928479)
Smalltalk environments have defaulted to proportional fonts back to the beginning of time [1]. Some of the newer ones allow for richtext code, so if you really need to make that ascii art drawing, you can change the font in the comment. Also look up elastic tabstops for an alternate alignment solution.

The tricky part is there aren't many proportional fonts designed for coding (but more than there used to be). One early 90s version of ST defaulted to Helvetica, which was a nightmare to read on the then current lowres screens. Of the current choices, Input is probably the best place to start. Verdana is popular with some, and I've used Lucida a bunch, both sans and serifed. I have also had fun using not really suited display fonts like Papyrus or surprisingly readable drafting handwriting fonts like Tekton. It is usually recommened to use a sans font for readability, but I think that advice is outdated on modern very hires displays with subpixel antialising.

[1] https://fontstruct.com/fontstructions/show/1693628/cream-10p...

The proportional fonts question recurrs periodically:

2005 https://ask.metafilter.com/16469/Proportional-programming-fo...

2010 https://slashdot.org/story/130020

https://www.quora.com/Are-monospace-or-proportional-fonts-be...

2019 https://news.ycombinator.com/item?id=18958046

Re:Ask HN: Anyone using proportional fonts for coding? by cjbprime on Sunday July 30, 2023 @03:32AM (#36928765)
Yes, I like Iosevka Aile a lot. And it's free! So worth a try.

https://chris.printf.net/iosevka-aile.png

https://typeof.net/Iosevka/

Re:Ask HN: Anyone using proportional fonts for coding? by rpastuszak on Sunday July 30, 2023 @08:54AM (#36930677)
Oh, Iosevka is one of my favourite fonts, thanks!
Re:Ask HN: Anyone using proportional fonts for coding? by mieses on Sunday July 30, 2023 @04:07AM (#36928969)
fonts? real programmers use paper and pencil
Re:Ask HN: Anyone using proportional fonts for coding? by isr on Sunday July 30, 2023 @04:39AM (#36929154)
I've been using cuis smalltalk with proportional fonts, even a slightly cursive looking one.

And before you get your pitchforks out, that's from a longtime (since 1998) vim user, whose other current weapon of choice is a neovim setup which acts as as its own multiplexer, thereby replacing gnu-screen (tmux for the rest of you).

In cuis, the morphic graphics system has been rebuilt to be entirely vector-graphics based. Entirely. Everything. The text rendering is beautiful. Each window can be scaled up or down with just a right click to bring up the 'halo', and then just drag the icon. The fonts are redrawn with vector graphics. There is zero quality loss, up or down.

Scaling up or down to cater for different dpi screens is no longer an issue.

The beauty of it is actually a little inspirational, as silly as that sounds. You feel like you have an expensive Japanese-nibbed fountain pen, and high quality parchment, and it forces you to write something.

(yes, the rendering quality remains, even if you also rotate the window as well).

Re:Ask HN: Anyone using proportional fonts for coding? by slim on Sunday July 30, 2023 @02:14PM (#36934230)
one trick that always impresses is when you rotate the window and scroll the text.
Re:Ask HN: Anyone using proportional fonts for coding? by NBJack on Sunday July 30, 2023 @09:48AM (#36931119)
This sounds like a nightmare for Python. No auto formatter would solve inconsistent indentation for you.

You would need to put a little more effort into using your caret to find issues when a compiler gives a row and column coordinate.

Max width restrictions (i.e. 80 columns) would become meaningless and arbitrary.

Your entire team would likely have to agree to the font choice for consistency.

OS font rendering differences would make life very interesting.

Re:Ask HN: Anyone using proportional fonts for coding? by rhn_mk1 on Sunday July 30, 2023 @10:21AM (#36931401)
You get in trouble only if you see hanging indentations:

Foo(Bar(...), baz)

But they are not required for a happy life:

Foo( Bar(...), baz, )

It's not PEP8, but it works, and it does not depend on the font at all. 80 columns is bollocks in any case, but with this style, width is usually even reduced.

Alternatively, Elastic Tabstops solves this, but it's supported by approximately no one.

https://nickgravgaard.com/elastic-tabstops/

Re:Ask HN: Anyone using proportional fonts for coding? by geon on Sunday July 30, 2023 @10:38AM (#36931572)
I have been using Comic Sans for years. I like it.
Re:Ask HN: Anyone using proportional fonts for coding? by exebook on Sunday July 30, 2023 @11:21AM (#36932108)
I made my own proportional font Variable.ttf and refined it for over a decade. I am using it daily. Over many iterations I refined space width and each important coding character's shape and size. Added some ligatures in the last few years. It's very good I consider it a work of art, and I cannot think about going back to fixed fonts. Only me and my friend use it.

https://github.com/exebook/variable

Re:Ask HN: Anyone using proportional fonts for coding? by MathMonkeyMan on Sunday July 30, 2023 @02:32PM (#36934433)
I use Verdana. Everyone thinks I'm nuts, but I like reading code that way.
Re:Ask HN: Anyone using proportional fonts for coding? by xeonmc on Sunday July 30, 2023 @06:29PM (#36936652)
Not exactly proportional, but has the legibility of proportional while actually being monospaced -- Comic Mono [0] is a monospaced font based on Comic Sans.

[0] https://dtinth.github.io/comic-mono-font/

Re:Ask HN: Anyone using proportional fonts for coding? by GnarfGnarf on Sunday July 30, 2023 @08:22PM (#36937517)
The hallmark of a good font is that it does not draw attention to itself. It does not interfere with the reader’s grasp of the author’s meaning, and it recedes into the background.
Re:Ask HN: Anyone using proportional fonts for coding? by rpastuszak on Tuesday August 01, 2023 @07:18AM (#36954675)
Yes, and?
Re:Ask HN: Anyone using proportional fonts for coding? by GnarfGnarf on Thursday August 03, 2023 @07:35AM (#36984339)
Proportional fonts draw attention to themselves and fail the criteria by being distracting.
Re:Ask HN: Anyone using proportional fonts for coding? by kazinator on Monday July 31, 2023 @11:07AM (#36943754)
Doesn't play nicely with aligned material.

Parallel definitions lined up for readability.

  #define AF_UNSPEC       PF_UNSPEC
  #define AF_LOCAL        PF_LOCAL
  #define AF_UNIX         PF_UNIX
  #define AF_FILE         PF_FILE
  #define AF_INET         PF_INET
  #define AF_AX25         PF_AX25
  #define AF_IPX          PF_IPX
  #define AF_APPLETALK    PF_APPLETALK
  #define AF_NETROM       PF_NETROM
  #define AF_BRIDGE       PF_BRIDGE
  #define AF_ATMPVC       PF_ATMPVC
  #define AF_X25          PF_X25
Similarly in structure definitions where there are line comments:

C preprocessor continuation backslashes.

  /* From some MD5 code */

  #define FF(a, b, c, d, x, s, ac) {                      \
    (a) += F((b), (c), (d)) + (x) + convert(u32_t, ac);   \
    (a) = ROTATE_LEFT ((a), (s));                         \
    (a) += (b);                                           \
  }

  #define GG(a, b, c, d, x, s, ac) {                      \
    (a) += G((b), (c), (d)) + (x) + convert(u32_t, ac);   \
    (a) = ROTATE_LEFT ((a), (s));                         \
    (a) += (b);                                           \
  }
Alignment in parallel definitions.

  struct netent {
    char *n_name;                 // Official name of network.
    char **n_aliases;             // Alias list.
    int n_addrtype;               // Net address type.
    uint32_t n_net;               // Network number.
  };
No, tabs will not fix this issue, unless everyone agrees on exactly the same font, and the same tab stops, in the same editor. What looks vertically aligned in your editor looks staggered in someone else's.

This kind of thing is not unheard of:m

  struct netent {
    char      *n_name;              // Official name of network.
    char     **n_aliases;           // Alias list.
    int        n_addrtype;          // Net address type.
    uint32_t   n_net;               // Network number.
  };
We have the identifiers of the declarators vertically lined up, but the pointer derivators hang to the left. Tabs will just not do this.

Proportional font coders are in the lunatic fringe.

All else being equal, do not hire.

Re:Ask HN: Anyone using proportional fonts for coding? by kazinator on Monday July 31, 2023 @07:09PM (#36950119)
Another thing that doesn't work with proportional fonts:

  function(arg1,
           arg2,
           arg3);
Note that this, and everything in my above comment, can work just fine with tabs used for indentation, and set to the developers' preference:

  [tab]struct netent {
  [tab]  char      *n_name;              // Official name of network.
  [tab]  char     **n_aliases;           // Alias list.
  [tab]  int        n_addrtype;          // Net address type.
  [tab]  uint32_t   n_net;               // Network number.
  [tab]};

  [tab]{
  [tab][tab]function(arg1,
  [tab][tab]         arg2,
  [tab][tab]         arg3);
Change tab size, alignment is fine. Change to proportional font, it all goes haywire.
Re:Ask HN: Anyone using proportional fonts for coding? by MathMonkeyMan on Friday August 04, 2023 @06:02AM (#36997757)
We could give up on thinking of code as:

- a sequence of characters and spaces

- a series of lines

- a fixed grid of characters and spaces

Instead, store code as a parse tree -- comments and all. Then we'd view and edit code using "WYSIWYG" editors solely. No more "cat" and "less", we'd need new tools. No more tty-like terminals, we'd need something more like a web browser.

It would cripple existing workflows and hinder compatibility, but the advantage is that "formatting" would be the viewer's preference. Forget about tab stops and fonts; think more like CSS. It's an extreme version of the tabs people's argument.

Word/Sheets documents come close, in a horrifying way. What I'm describing is more like Graphviz.

Re:Ask HN: Anyone using proportional fonts for coding? by JohnFen on Monday July 31, 2023 @03:53PM (#36947896)
I tried using proportional fonts for a while, but I couldn't get used to them. For me, the make it more difficult to read (and write) the source code because I didn't have predictable landmarks to follow anymore.

Also, they make creating diagrams and aligning things essentially impossible.