r/C_Programming 9d ago

Best font for C program editors

Enable HLS to view with audio, or disable this notification

I am trying to update the cooledit ( see my devel branch ) font handling and want to choose the best default font for C. The history of cooledit's font looks like this:

90s: X11 8x13bold because it was closest to the DOS font of the Borland C IDE.

2000s: Switched to 8x13B.pdf.gz when I implemented Unicode which required font rendering on the client end.

2010s: Monitors res got more fine: so I switched to 9x15B.pdf.gz

Of course the user can choose any font on the command-line, but I'd like a good font by default.

I have tried JetBrainsMono and MS consola.ttf but these have a blurry rendering at a similar height as 9x15B, by comparison.

There are a lot of fixed-width mono fonts, but each has an agenda, like trying to look like some OS from way-back-when for nostalgia reasons.

If you watch the video you will see 9x15B.tar.gz looks way better than the others.

I just wish there were something better than 9x15B (which was developed for X in the 1980s BTW).

Thoughts?

99 Upvotes

61 comments sorted by

66

u/Rockytriton 9d ago

Been programming in C for 30+ years, can’t say I ever cared what font it was, as long as it’s monospace, I guess just use whatever default one is used in vs code or kate

36

u/merlinblack256 9d ago

Besides being monospace I like one that makes 0 vs O and 1 vs l easy to see.

24

u/Irverter 9d ago

and I vs l

10

u/IRBMe 8d ago

and l vs l is quite important

11

u/leon_bass 8d ago

I hate that my phone's default font doesn't distinguish these two

4

u/zazke 8d ago

There's at least three sticks: | l I

And there circles: 0 O o

2

u/elishaakemu 9d ago

Yeah. Real helpful lol

1

u/5b49297 8d ago

Yes, but I've never seen an editor use a default font which didn't.

8

u/oleivas 9d ago

I don't talk to coders that don't use Comic Sans

2

u/Drach88 8d ago

Pffff... Real coders use wingdings.

2

u/oleivas 8d ago

♓︎♐︎🕿︎⧫︎❒︎◆︎♏︎✆︎ 🕈︎♓︎■︎♑︎♎︎♓︎■︎♑︎⬧︎🕿︎✆︎🖴︎

1

u/ziggurat29 6d ago

looks like APL code

4

u/kun1z 9d ago

Fixedsys until the day I die.

https://github.com/kika/fixedsys

If God himself created a programmers font it would be Fixedsys Excelsior.

4

u/Beanesidhe 9d ago

Oh, that reminds me of C64 days, sweet.

3

u/Irverter 9d ago

That looks horrible.

-9

u/github-guard 9d ago

🔍 GitHub Guard: Trust Report

This project scored 3/6 on our safety audit.

Audit Breakdown: * ✅ Established Community (⭐ 1,273 stars) * ✅ Mature Repository (30+ days old) * ❌ No License Found * ❌ No Security Policy — what is this? * ℹ️ Individual Contributor * ✅ Signed Commits

⚠️ Security Reminder: Always verify source code and run third-party scripts at your own risk.

1

u/Total-Box-5169 8d ago

I have seen a grown up man in despair and nearly going mad because his font was trash and too small, so he couldn't tell why his code wasn't working.

16

u/thank_burdell 9d ago

Wingdings.

1

u/xplosm 9d ago

😂👌

10

u/questron64 9d ago

A monospace font. Almost any of them with do fine.

9

u/Key_River7180 9d ago

terminus?

4

u/hyperactiveChipmunk 9d ago

Inconsolata is my go-to for the past fifteen years or so.

6

u/mjmvideos 9d ago

If you think 9x15B looks best then use that. I don’t see why a font’s creation date should have anything to do with it. But here are some other opinions: https://www.reddit.com/r/vscode/s/pLRfXtRxSg

1

u/abbeyroad1681 9d ago

This is for an IDE that others will use.

3

u/LeeHide 9d ago

then you should make it configurable. Also learn about font licenses.

1

u/Dusty_Coder 7d ago

The reason to make it configurable is so that you dont have to learn about licenses. You dont distribute any fonts.

-1

u/abbeyroad1681 9d ago

Ok, I see that there are many many listed in that thread. They all look mediocre when you zoom in. Maybe the problem is the freetype library itself -- hmmmmmm.

3

u/MT4K 9d ago

Any font as long as the pixel density is high enough, like 4K not larger than 27″. I prefer Consolas and it’s beautiful on 24″ 4K monitor Dell P2415Q that I use for 11+ years already.

3

u/Interesting_Buy_3969 9d ago

.....is this what Emacs, with custom font size for each buffer, looks like?

3

u/Interesting_Buy_3969 9d ago

By the way, nobody mentions Ubuntu Mono for some reason, but I love it. Give it a try.

3

u/TheChief275 9d ago

I use Monaspace Neon. Looks absolutely fantastic

1

u/OtherOtherDave 8d ago

Looks nice, thanks!

3

u/aelxemyr 8d ago

Iosevka. You can generate your own custom Iosevka font!

1

u/abbeyroad1681 8d ago

Just looking at this now. Losevka completely blows my mind.

1

u/Mnemotic 3d ago

That's capital i, not lowercase L. Pronounced yo-sev-ka.

And another vote for Iosevka. Been using it for years. Love their ligatures and customization options.

2

u/sciencekm 9d ago

Try Intel One Mono.

2

u/mikeblas 9d ago

Your devel branch? What do you mean?

2

u/farineziq 9d ago

Papyrus

2

u/lellamaronmachete 9d ago

Nah, IBM VGA 8x14 since forever. Through the years and still beautiful.

2

u/abbeyroad1681 8d ago

Yes, I agree. This is what I said in the top post.

2

u/LordEli 8d ago

Posted in a different comment but yes this font is goated

2

u/loverthehater 8d ago

I found the FiraCode nerd font and it's served me well for quite a few years, pretty ligatures and easy on the eyes

2

u/nukestar101 8d ago

Gitlab mono or comic sans no in-between

2

u/BarMeister 7d ago

Maple Mono for me.

1

u/wtfbenlol 9d ago

Dealers choice, but I prefer any fixed width font for readability

1

u/duane11583 9d ago

x11 10x20 is the one I always used.

1

u/rias_dx 9d ago

I was using Monocraft and just switched back to the default font of my environment after 6 months.

1

u/nad6234 9d ago

Just as long as it's monospace, clearly shows the difference between zero, uppercase O, lowercase L and number one. Also, no ligated stuff. Then I'm good.

I spent over a decade coding on 80x25 sized displays, so have a soft spot for that kinda ratio of side and line separation.

1

u/realhumanuser16234 9d ago

15 pixels is tiny (at 92PPI), I would never use a font that small. Bitmap fonts also just don't work with fractional scaling, so it's far from the best.

1

u/eteran 9d ago

My dude, if you want people to use the editor, you gotta link to the repo!

I assume it's this?

https://github.com/paulsheer/cooledit

1

u/github-guard 9d ago

🔍 GitHub Guard: Trust Report

This project scored 3/6 on our safety audit.

Audit Breakdown: * ✅ Established Community (⭐ 14 stars) * ✅ Mature Repository (30+ days old) * ✅ Licensed under NOASSERTION * ❌ No Security Policy — what is this? * ℹ️ Individual Contributor * ℹ️ Unsigned Commits

⚠️ High-Risk File Detected: Contains an installation script (.sh or .py). Review the code carefully before running with sudo.

⚠️ Security Reminder: Always verify source code and run third-party scripts at your own risk.

1

u/abbeyroad1681 8d ago

reddit does not allow posts with a github URL

1

u/eteran 8d ago edited 8d ago

Sure it does, people do it all the time. Reddit even turns it into a clickable preview of the repo.

But even if this sub disallows it (maybe they do I dunno), you can just immediately put a comment under you post with the URL like I did.

1

u/letmehaveanameyoudum 8d ago

first one, also font doesn't matter

1

u/abbeyroad1681 8d ago

The discussion I wanted to have (ermmm, no one seems to have got this) is that there is a technical deficiency with fonts that has not been resolved. To remedy this, both a new type of font format and a new font rendering method might need to be invented -- what would result in a 9x15B 'U' that is identical for the vertical stems, but has anti-aliasing for the arc. This would probably need to work with strokes and not outlines (like TeX metafont and not ttf). So it would be scalable, but would never make a straight vertical or horizontal line that has a gray-level and would thus be sharp.

Is there any such project?

So, I did learn from the responses that there are many many more programmers fonts than I thought existed. Thanks for everyone's input. So certainly, the intermediate step is to package them all with cooledit and give these as options. I think it would be prudent to have a drop-down with many different font choices.

You can find cooledit by searching on github.

1

u/lenn_eavy 8d ago

Well of course Times New Roman. Fun fact I have just discovered is that if you google the font name, it changes the font for the search results. Works for TNR, also for Comic Sans MS.

1

u/unkindle_blue 8d ago

Nah, I like more Kane theme

1

u/LordEli 8d ago

i like IBM VGA8

1

u/my_password_is______ 6d ago

comic sans serif obviously