What font do you use to write code?
-
I seen a Twitter thread asking "Favorite fonts as a developer...GO?!?!"
May be a bit vague, but the intent of the question was the title if this topic.
It's not something I've thought about because the default font in VSCode never prompted me to think about wanting to change it.
Does anyone use a specific font to code? Which one? Why?
-
-
I only change when the font is too fat because I think light fonts are easier to read when you are scanning page after page of code.
Best fonts IMHO are those that are manually hinted. That means that each pixel is placed so that the font looks as good as possible at a specific size. This is to increase readability at small font sizes. Old fonts like fixedsys where rasterized so they always looked perfect at each size. But you couldn't use a size that wasn't defined in the font because then it would horrible.
But essentially any monospace font would work for writing code. I don't use visual studio often but if I did I would use a white theme and change the font.
Right now I'm using Courier New size 10. It's not perfect, but gets the job done. In the end it's just personal preference.
-
@Pete-S said in What font do you use to write code?:
I only change when the font is too fat because I think light fonts are easier to read when you are scanning page after page of code.
Best fonts IMHO are those that are manually hinted. That means that each pixel is placed so that the font looks as good as possible at a specific size. This is to increase readability at small font sizes. Old fonts like fixedsys where rasterized so they always looked perfect at each size. But you couldn't use a size that wasn't defined in the font because then it would horrible.
But essentially any monospace font would work for writing code. I don't use visual studio often but if I did I would use a white theme and change the font.
Right now I'm using Courier New size 10. It's not perfect, but gets the job done. In the end it's just personal preference.
I've been using the default font in VSCode, and use ctrl+ or ctrl- to change size depending on the screen I'm using and how far away I am.
I will be exploring different fonts though just out of curiosity with both dark and light theme, to see if there is any improvement in experience.
-
My settings : 'Fira Code', Consolas, 'Courier New', monospace
Found HERE -
I'm almost always a default fonter myself.
-
Always default but I move asap to dark themes.
-
@matteo-nunziati said in What font do you use to write code?:
Always default but I move asap to dark themes.
Same
-
@scottalanmiller said in What font do you use to write code?:
@matteo-nunziati said in What font do you use to write code?:
Always default but I move asap to dark themes.
Same
Don't know about you guys, but most people use dark themes because they strain their eyes with the light themes.
But the problem is not the theme, because you shouldn't get eye strain with a light theme. The real problem is that the monitor is set way too bright. Like a lot. Monitor brightness should be about equal to the ambient light level. Bright monitors make for punchy images but horrible ergonomics.https://www.eizoglobal.com/library/Guide_to_preventing_eye_fatigue.pdf
-
@Pete-S said in What font do you use to write code?:
@scottalanmiller said in What font do you use to write code?:
@matteo-nunziati said in What font do you use to write code?:
Always default but I move asap to dark themes.
Same
Don't know about you guys, but most people use dark themes because they strain their eyes with the light themes.
But the problem is not the theme, because you shouldn't get eye strain with a light theme. The real problem is that the monitor is set way too bright. Like a lot. Monitor brightness should be about equal to the ambient light level. Bright monitors make for punchy images but horrible ergonomics.https://www.eizoglobal.com/library/Guide_to_preventing_eye_fatigue.pdf
Light themes are great with "Night light" mode turned on in Windows 10. It reduces the blue light a lot and is less bright.
-
Typically default, but if I actually make a choice, then Consolas. Except for PowerShell ISE, dark themes always.
-
Been using Source Code Pro for years. If that isn't available, I'll use Consolas. As for theme, my eyes can't stand dark themes, so I always go with a light theme.
-
I tried several of popular fonts in both light and dark theme in VSCode. In the end I chose Fira Code. I've been back and forth today between a light theme and dark theme, with Win10 Night Light setting just under half way:
- Fira Code - Winner
This one was the smoothest and sharpest with the over-all nicest characters on both dark and light themes. - Input Mono
- Camingo Code
- Go Mono
- Hack
- Office Code Pro
- ProggyDotted
- Source Code Pro
With the light theme, I tried taking a pic, but doesn't really do it justice. It's easy to read without missing things. Not hard on the eyes at all. It's more of a calm and relaxing way to read code while still seeing the context highlighting. Any adjustments I seem to need have to do with the strength of Night Light setting. I vary it between half and just under half.
I may choose different themes based on the language. Nobody says you have to stick with the same one under all circumstances all the time.
Dark theme was visually nicer, but for readability, I feel like I tend to agree with the studies. I took this from some post on stackexchange:
There has been a lot of research on this topic since the 1980s and a lot of it still holds true today. One study from the 1980s states this: However, most studies have shown that dark characters on a light background are superior to light characters on a dark background (when the refresh rate is fairly high). For example, Bauer and Cavonius (1980) found that participants were 26% more accurate in reading text when they read it with dark characters on a light background. Reference: Bauer, D., & Cavonius, C., R. (1980). Improving the legibility of visual display units through contrast reversal. In E. Grandjean, E. Vigliani (Eds.), Ergonomic Aspects of Visual Display Terminals (pp. 137-142). London: Taylor & Francis The reason why this matters is because of focus. As this article on UXMovement states, "white stimulates all three types of color sensitive visual receptors in the human eye in nearly equal amounts." It causes the eye to focus by tightening the iris. Since the eye is focused, dark letter forms on light backgrounds are easier to read. When using a dark background with strong light letter forms, the iris opens to allow more light in, but that causes letter forms to blur. Why? People with astigmatism (approximately 50% of the population) find it harder to read white text on black than black text on white. Part of this has to do with light levels: with a bright display (white background) the iris closes a bit more, decreasing the effect of the "deformed" lens; with a dark display (black background) the iris opens to receive more light and the deformation of the lens creates a much fuzzier focus at the eye. Jason Harrison – Post Doctoral Fellow, Imager Lab Manager – Sensory Perception and Interaction Research Group, University of British Columbia Now there seem to be varying factors into contrast and legibility. Room ambient lighting. Brightness of the monitor. Also you can mitigate the straining effects of white (#FFF) on black (#000) by simply lessening the contrast like using a light gray (#EEE, #DDD, #CCC) on a dark background (#111, #222).
After much going back and forth, I've come to my own person opinion and conclusion that I feel light themes as I described above, are best for strictly reading, such as reading book/ebook. But when actively coding, the dark theme seems IMO to make it easier to see all the different colors. And that helps a lot.
- Fira Code - Winner
-
@Obsolesce said in What font do you use to write code?:
@Pete-S said in What font do you use to write code?:
@scottalanmiller said in What font do you use to write code?:
@matteo-nunziati said in What font do you use to write code?:
Always default but I move asap to dark themes.
Same
Don't know about you guys, but most people use dark themes because they strain their eyes with the light themes.
But the problem is not the theme, because you shouldn't get eye strain with a light theme. The real problem is that the monitor is set way too bright. Like a lot. Monitor brightness should be about equal to the ambient light level. Bright monitors make for punchy images but horrible ergonomics.https://www.eizoglobal.com/library/Guide_to_preventing_eye_fatigue.pdf
Light themes are great with "Night light" mode turned on in Windows 10. It reduces the blue light a lot and is less bright.
I use dark themes + night light + min brightness all day long.
-
@matteo-nunziati said in What font do you use to write code?:
@Obsolesce said in What font do you use to write code?:
@Pete-S said in What font do you use to write code?:
@scottalanmiller said in What font do you use to write code?:
@matteo-nunziati said in What font do you use to write code?:
Always default but I move asap to dark themes.
Same
Don't know about you guys, but most people use dark themes because they strain their eyes with the light themes.
But the problem is not the theme, because you shouldn't get eye strain with a light theme. The real problem is that the monitor is set way too bright. Like a lot. Monitor brightness should be about equal to the ambient light level. Bright monitors make for punchy images but horrible ergonomics.https://www.eizoglobal.com/library/Guide_to_preventing_eye_fatigue.pdf
Light themes are great with "Night light" mode turned on in Windows 10. It reduces the blue light a lot and is less bright.
I use dark themes + night light + min brightness all day long.
Not at night time?
-
It is amazing what a difference the Night light settings make. I could feel my eyes relaxing when I turned them on (12 pm local time).
-
@Kelly said in What font do you use to write code?:
It is amazing what a difference the Night light settings make. I could feel my eyes relaxing when I turned them on (12 pm local time).
You also get the same effect by lowering the brightness of your monitor and change the color temperature. It's actually better from a technical point of view because you keep the color resolution that way and also some monitors do special things with the backlight when you lower the brightness.
The primary things that causes eye sore is too much brightness difference between ambient and monitor, large difference between color temperature from ambient light versus monitor (this is where the blue thing comes from) and then flickering from the backlight.
-
@Obsolesce said in What font do you use to write code?:
@matteo-nunziati said in What font do you use to write code?:
@Obsolesce said in What font do you use to write code?:
@Pete-S said in What font do you use to write code?:
@scottalanmiller said in What font do you use to write code?:
@matteo-nunziati said in What font do you use to write code?:
Always default but I move asap to dark themes.
Same
Don't know about you guys, but most people use dark themes because they strain their eyes with the light themes.
But the problem is not the theme, because you shouldn't get eye strain with a light theme. The real problem is that the monitor is set way too bright. Like a lot. Monitor brightness should be about equal to the ambient light level. Bright monitors make for punchy images but horrible ergonomics.https://www.eizoglobal.com/library/Guide_to_preventing_eye_fatigue.pdf
Light themes are great with "Night light" mode turned on in Windows 10. It reduces the blue light a lot and is less bright.
I use dark themes + night light + min brightness all day long.
Not at night time?
Every hour of the day or my eyes bleed... Well maybe it is not the min brightness but a close value for sure