My coding font and how I made it

4 pointsposted 6 hours ago
by efortis

2 Comments

bitpush

5 hours ago

I dont want to be dismissive of what you're doing, but I didnt see the motivation of why you want space before capital letters in camelCase.

My brain perceives `fun doSomething` and `fun do Something` very differently, so I'm assuming you have a very good reason on why that's the case.

efortis

5 hours ago

No worries, the motivation was that one day I was very tired and I noticed I had to make an extra effort to read long camel case names. The last screenshot in the readme has the snippet I was reading that day.

So I added the left padding to uppercase letters, and to avoid confusing it with a real space char, I made the space 4x wider.

I kept experimenting with the real space width and the padding ratio. At first I added like 1/6 of padding, and I noticed it took me just a few minutes to get used to it, so I increased it to 1/3.

It also depends on the font size. if it’s over 18pt then 1/3 of padding is too much, but I think it works well for 12-14pt

So if I’m sharing my screen with a large font I change it to mono.