Programming fonts

General FreeBASIC programming questions.
Post Reply
deltarho[1859]
Posts: 4292
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Programming fonts

Post by deltarho[1859] »

I have been using Consolas for some years now but came across another which I prefer. It can be got in google/fonts at GitHub: Inconsolata-Regular.ttf

If you have not installed fonts before open the Control Panel at Fonts and drag & drop the ttf file - job done.

Give it a whirl - you may like it.
paul doe
Moderator
Posts: 1730
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: Programming fonts

Post by paul doe »

For everyday work, my absolute preference goes to Fira Mono, hands down. It is very readable, has pretty distinctive glyphs for operators and has a very nice spacing (especially vertical). The most readable coding font I could find. I suffer from severe eye strain so this is pretty important for me.

There's another version, Fira Code, that comes with ligatures (if you like to use them/your IDE supports them).
deltarho[1859]
Posts: 4292
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: Programming fonts

Post by deltarho[1859] »

Paul wrote:very nice spacing (especially vertical)
My eyes are not as good as they were and a decent vertical spacing is a must for me. On comparing Fira Mono and Inconsolata the latter's vertical spacing is the greater.
I suffer from severe eye strain
What do you do when programming of an evening? I have been using f.lux for some years now. Win10 has 'Night light settings' but it has some way to go to match f.lux. f.lux has a 'Reduce Eyestrain' setting with a colour temperature of about 3450K. If I disable f.lux I nearly get blown out of my chair at 6500K. <smile>
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Programming fonts

Post by caseih »

I'm a weird one and I prefer the old IBM BIOS VGA font. I use it for all my programming editors. Even at a real pixel size of 8x16, it's very crisp and readable on a 1080p screen. I like the weight of the font. It's just easy on my eyes. I use a TTF version called Less Perfect VGA. At 12 pts it is pixel perfect to the original 8x16 font (well almost... adjustments made because VGA's text mode font was actually 9x16 at a slightly different aspect ratio. It will scale up fairly well, so it should look okay on a 4k screen at a higher font size.

For me, the colors the text editor uses are very important. The absolutely best color scheme I've ever used for programming is the famous "Desert" color scheme, originally made for the ViM editor, which is my primary editor. But similar color schemes have been made for most text editors. A grey background, with several more saturated colors that are easy on the eyes. Light grey text, rose-colored string literals, greenish identifiers, yellowish reserved words, blueish comments. Example with my font of choice:
Image
sero
Posts: 59
Joined: Mar 06, 2018 13:26
Location: USA

Re: Programming fonts

Post by sero »

Last edited by sero on Feb 12, 2021 3:16, edited 2 times in total.
paul doe
Moderator
Posts: 1730
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: Programming fonts

Post by paul doe »

deltarho[1859] wrote: ...
What do you do when programming of an evening? I have been using f.lux for some years now. Win10 has 'Night light settings' but it has some way to go to match f.lux. f.lux has a 'Reduce Eyestrain' setting with a colour temperature of about 3450K. If I disable f.lux I nearly get blown out of my chair at 6500K. <smile>
Generally speaking, I always set two color schemes for every code editor I use (FbEdit, VS Code and VS Community IDE, along with others I created for DSLs and/or implementation-specific languages of my own design), and I set the brightness of the laptop I use for coding to a minimum. Works for me, but I'll have a look at your suggested solution ;)
caseih wrote:I'm a weird one and I prefer the old IBM BIOS VGA font. I use it for all my programming editors. Even at a real pixel size of 8x16, it's very crisp and readable on a 1080p screen. I like the weight of the font. It's just easy on my eyes. I use a TTF version called Less Perfect VGA. At 12 pts it is pixel perfect to the original 8x16 font (well almost... adjustments made because VGA's text mode font was actually 9x16 at a slightly different aspect ratio. It will scale up fairly well, so it should look okay on a 4k screen at a higher font size.
...
Oh, then you'll definitely love this site:

https://int10h.org/oldschool-pc-fonts/

It contains .ttf renditions of almost all 'vintage' fonts (like the one you mentioned, among many others).

This site also contains some pretty cool fonts for coding:

http://www.programmingfonts.com/
caseih wrote: ...
For me, the colors the text editor uses are very important. The absolutely best color scheme I've ever used for programming is the famous "Desert" color scheme, originally made for the ViM editor, which is my primary editor. But similar color schemes have been made for most text editors. A grey background, with several more saturated colors that are easy on the eyes. Light grey text, rose-colored string literals, greenish identifiers, yellowish reserved words, blueish comments. Example with my font of choice:
...
Yeah, I use a very similar scheme, but I prefer (need, more likely) more desaturated colors. Example from my current FbEdit scheme (it's overcast here now, so I'm using the 'Dark' color scheme):
Image

Comments aren't shown I realized, but they are grey (a little darker than normal text). And the font used is, of course, Fira Mono =D

Overall, I have difficulty seeing over-saturated colors on a dark background and light-weight glyphs (if they both combine, I just see a blurry mess). Those limitations also shaped my coding conventions: mostly vertical code layout, lots of negative space and, if the language syntax allows/make sense, brackets along expressions (especially predicates, but perhaps that last one comes from a liking to Lisp haha), since brace matching allows me to immediately identify if an expression is closed or not.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Programming fonts

Post by caseih »

Those colors do look nice! Interesting how a nice color scheme can make it so much more comfortable on the eyes. In ancient times it was just green or amber on a dark screen and we thought that was pretty good! I think programmers have always preferred dark backgrounds until Visual Studio forced bright white backgrounds upon us, which was emulated by quite an number of IDEs for a long time, until the recent re-discovery of "dark" color themes.
marcov
Posts: 3455
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: Programming fonts

Post by marcov »

I also have some dos nostalgia, but I go for the classic colors rather than the fonts

Image.

Actually with current LED monitors, it is much better since they don't have to be overly bright to have good contrast.
deltarho[1859]
Posts: 4292
Joined: Jan 02, 2017 0:34
Location: UK
Contact:

Re: Programming fonts

Post by deltarho[1859] »

I dropped the opening post at PowerBASIC. Quite a few members mentioned their favourites but none of them had as much line spacing as Inconsolata. When the dust had settled a member came in with a font he has only recently started using. What caught my eye was the ability to have a bespoke line spacing amongst other things.

Here are some links:
Home page
Customize page

Here is a snapshot of part of the customization page ( after clicking on 'Customize your download' ) and what I chose. When we request the download a ttf is compiled as per our choices. Is that neat or what? <smile>

Image

There is an easier way to install, right click on the ttf file and then click on 'Install'.

There is a charge for commercial use but it is free for private use.

Here is what it looks like, you may reckon that I have gone over the top on line spacing. On opening the slider is set at 1.2x. I have used 10 point in WinFBE.

Image
Post Reply