Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Try PTMono, a beautiful monospace font that looks like serif (google.com)
94 points by tzury on May 19, 2012 | hide | past | favorite | 50 comments


Just tried in my editor. At a size small enough to fit as many lines of text on screen as I can with Bitstream Vera Sans Mono, PTMono letters look like barely legible squiggles.

Still yet to find a font that competes with Menlo/Vera Sans Mono for coding on a 900px-tall laptop screen. If anyone knows of such a thing, please let me know.


I really like Anonymous Pro, 11pt font, 0.9 linespacing on my 1440x900 mac. Looks good with light AA

http://www.ms-studio.com/FontSales/anonymouspro.html

edit: it sort of has serifs. kind of. well more than most sans fonts


I like this one, thanks. It appears to be a lighter-looking (at least with my font smoothing settings) version of Courier (which is good because regular Courier is legible but quite heavy at small sizes). The "serifs" are actually slabs, just like in Courier.


That's what they're called!

Yeah, Courier is way too thick for my tastes.


My favorite is the Envy Code R: http://damieng.com/blog/2008/05/26/envy-code-r-preview-7-cod...

I'm using it with full hinting enabled on Ubuntu/Xubuntu and it looks just as nice as the Windows screenshots on the homepage.


Thanks. I tried it out, and here's the thing about Envy: it's a horizontally condensed typeface, which is good if your lines of code are very long (great if you're a Java programmer and have to deal with names like myAbstractFactoryClassMethodVerisonFive), but rather terrible if you're someone like me who keeps his lines no longer than 80 characters and has a habit of splitting his code windows into two or three vertical panels.

The idea is to fit as many lines of text vertically, not to condense long lines horizontally. Human vision has some sort of legibility tradeoff where you can have letters that are either horizontally condensed but tall or vertically condensed but short. I am looking for something of the second kind for my main coding font.


Try dotsies: http://dotsies.org/


Lol.


Do you know whether the author plans to release it under an open license? A few years ago he promised to do that after the 1.0 release, but it seems unlikely at this point.


I'm a fan of Monte Carlo (http://www.bok.net/MonteCarlo/). ProFont is also really nice, but doesn't have a proper bold version.




Have a gander at Terminus 9pt. It's the one pixel font I can actually bear to look at.


"Looks like serif"? Did you mean to say it looks like a proportional-width font?


Yeah I don't think there is anything which prevents a font from being both monospaced and serif (indeed it must be either san-serif or serif, right?)


> it must be either san-serif or serif, right?

Not necessarily. This font is a monospaced hybrid of slab serif (fat serifs, regular line width) and sans serif.

See here for details: http://en.wikipedia.org/wiki/Serif


To be fair, most monospaced typefaces are at least to some degree slab serifs to visually compensate for the extra horizontal space (eg. letters like "l" and "i")


It's pretty overall, but the one character for which the illusion of proportionality really breaks is the lower-case L, which consistently appears to have a space after it.


I agree. The idea of using a curl instead of gigantic bottom slab serifs is nice, and the glyph looks good in isolation and word-finally, but elsewhere it really messes with the density. I would also prefer that lowercase I curl in similar fashion—if only because my handwriting is like that.


could you provide a sample sentence that shows this? I don't get the same impression.


If you look at the paragraph sample on the webfonts[1] page. you will see it. Also, you could type words like 'flow' or 'follow' into the sample box to see it next to other fonts. This really highlights the extra space on the 'l' glyph.

[1]http://www.google.com/webfonts


ah. I only really notice it in multiple L's. It uses the openfont license though. Which means you can legally crack it open using fontforge and adjust the kerning, and redistribute it as pt mono improved if youd like


'J' is kind of gross. Not a big fan of 'L' and 't', either. And... seriously, WTF is up with 'l'? Only a little goatse emoticon could be more vile. Sure, tastes differ. And reasonable men may disagree. But not in this case ;)

For Mac OS X, I suggest Luxi Mono. It does a much better job of looking like a reasonably-kerned proportional font.

For Windows, Lucida Sans Typewriter, with all antialiasing switched off. It has a nice clean look to it, and it manages to avoid being too squat.


I quite like the 'l' here. It solves the conundrum of how to differentiate the 'l' and '1' quite nicely.

I've so far stuck with Courier for monospace work (coding, console, etc), as I find sans-serif fonts hard to read (this is also why I don't use web fonts). I'll give this one a go for while and see how I get on.


The '1' vs 'l' point is a good one...

For many years, I used non-antialiased 9 point Courier New in Windows. This is an ugly font at most other point sizes, but at 9 points it is strangely attractive, and perfectly functional - except for '1' and 'l' being pixel-for-pixel identical. Oh, and '0' and 'O' too...

The experience appears to have left me unconcerned about such minor quibbles as being able to tell one glyph from another ;) (OK, so perhaps if '+' and '-' looked the same, I'd have an issue with that.)

Nevertheless, I stand by my "vile" comment. I mean... c'mon. Just look at it. What is this, Comic Sans? It's practically an offence against nature.


Why is coding so associated with monospace type? Has anyone tried using a proportional-width typeface?

The vast majority of use-cases I can think of are simply allowing you to line up the first letter of a line, or possibly an equals sign or something like that. This seems like something a tab-stop or somesuch in the editor could handle with ease, and shouldn't require sacrificing nice-looking text the rest of the time.


When I code, I have a bar down the window that shows the 80-character mark. If I didn't use a monospace font, that bar would be impossible to draw.

In fact, my editor of choice (Vim) assumes in many places that all displayed characters have the same width; it makes it a more consistent experience and allows you to do things on a simple console that you'd normally have to draw a complex (non-portable) GUI for.


I think it harkens back to coding's origins on punchcards. Many compilers still give errors along the lines of "Line 500, column 16", so it seems natural to use a font that incorporates those concepts into its design.

But yeah, I can think of a few people who AFAIK do mostly use proportional fonts, and they do just fine. I think it's mainly a path-of-least-resistance thing.


I used a proportional-width typeface on one of my recent projects in Java. It felt quite natural, actually, and took some of the pointless formatting distractions away from the coding process. Didn't constantly think about trying to keep lines of code within 80 characters, for example -- if it was readable on my screen it was fine.

The drawbacks were things like confusing lowercase L with 1 (one) in the sans-serif font I preferred, or the sort of editing where I was trying to change stuff at, say, character position 67 in a series of lines. It seems better for writing code than for editing it. Definitely give it a try if you haven't yet.


Back in the day, a lot of programming revolved around reporting. One reason I can think of would be laying out columns on reports, on terminals that didn't support proportional fonts.

A lot of people rail against tabs; most of the time, these are people who don't understand them or have never tried to use them.

You see this debate about tabs vs. spaces in code all the time, and I've yet to hear any valid argument about why spaces are better (at least in any modern context). But there is an obvious reason that tabs are better: It's much easier to line things up, keep them aligned across different users' fonts, and realign them if you change the text to cross a tab.


How quaint, another person who insists that people who don't use their preferred formatting just doesn't understand it! Never mind that maybe they just disagree--there has to be something wrong with them, right?

I don't use tabs because of an equally obvious reason that spaces are better: because I end up padding with spaces because the tabs are too big. For example, I like having horizontally consistent parameter argument lists, like below:

   class Thing {
       def beep(bar: String, baz: Int, quux: Seq[String],
                quuux: Map[String, String], quuuux: Int) = false
   }

If I tried to use tabs there, I'd be off by a space and have to add another space. Someone with a different hard-tab width would then get mad because there's an "extraneous" space in their view. And then we all have a nice big slapfight and sound like your post in the process.

(Plus, my editor treats four spaces in a row as a soft tab anyway, so I don't even notice it except when I want to. Life is peachy.)


I pointed out that they never give a specific reason for preferring spaces. At least you did that.

You can still achieve what you want, and even faster, by using tabs to get your subsequent parameter lines most of the way there and then padding with a couple of spaces.


I covered that exact "solution" in my post--the exact one! It blows up when somebody else is using a different tab width than I am. And given that I use soft tabs, it is no faster at all.


I kind of wish there were explicit bold,italic, and bold/italic versions.


I was thrilled when Ubuntu released a font. The Ubuntu Mono font is my new programming font everywhere. Make it the default in Sublime Text and you'll be a very, very happy camper.


I think this is what I've been waiting for.

Ubuntu Mono is nice but my eyes are not really good at detecting soft curves, I wanted something like Terminus[0] but with larger font sizes. (For some reason, I was unable to go beyond 10px with Terminus on Vim.)

[0]: http://terminus-font.sourceforge.net/shots.html



Inconsolata is the poor mans version of the fantastic Consolas... alas, on non-windows platform Consolas looks like shit.

Consolas comes for free with Visual Studio (probably pre-installed on Windows 7/Vista too)

Funny, inconsolata as well doesn't look that great on Windows...


Consolas looks just fine on OS X. A licensed version of it comes with BBEdit. The only curious thing about it I've noticed is that it requires good font smoothing--unaliased, it looks absolutely horrible.

It's also one of the very few monospaced fonts I've seen that has a true italic.


I think Ubuntu's monospace font has true italic? (I'm not a font expert, though.)

http://font.ubuntu.com/#charset-mono-regular-italic


Google's Droid Sans Mono is a pretty good copy of Consolas:

https://www.google.com/webfonts/specimen/Droid+Sans+Mono



You can get Consolas (and the other 'C' fonts) by installing MS Powerpoint Viewer.


I prefer Inconsolata-G. The differences are subtle.

http://leonardo-m.livejournal.com/77079.html


Technically this is slab, not serif.


Slab serifs are still serifs.


Looks very much like courier imho. Courier has bit more serifs, but the letterforms seem similar. Not ugly, but distinctly monospaced


Did anyone else notice how low @ was placed. It is especially annoying when at the beginning of a word like @word.


cool, this might be good for slideshows, especially on IT topics. I used Ubuntu font in my latest slideshow, and it looked quite well


Yay, CROSSBARS ON THE "I"!

Really, really tired of capital I's that look like lower-case L's. These should be banished.

And the above is the only time an apostrophe makes a plural.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: