Hacker News new | comments | show | ask | jobs | submit login
Iosevka – A Typeface for Code, from Code (be5invis.github.io)
568 points by justinjlynn on Apr 1, 2017 | hide | past | web | favorite | 122 comments

This font has been my daily driver for at least a year.

It has some similarities with Pragmata Pro (my previous font), but has evolved to have its own personality now.

I build a custom version of the font with this command-line:

  $ make custom-config design='v-tilde-low v-asterisk-low v-underscore-low v-at-short v-zero-dotted term' && make custom
This gives me:

- Disabled ligatures (I don't like them for my coding font)

- Underscore below the baseline (it is called underscore, after all)

- Tilde and asterisk centered vertically

- Zero with dots through it

- Fira Sans style @ symbol.

Sample: http://i.imgur.com/Hq4X7oV.png

Looks lovely in your screenshot but sadly looks pretty crap in Visual Studio 2017. Sigh.

Iosevka is my default font in visual studio. Actually it looks better with clear type than pragmatapro and Input fonts.

Why do you dislike ligatures in your coding font? Just curious.

Not the commenter you're asking to, but ligatures, to me, are a print thing. They are not nice on the computer screen. I'm kind-of fine with fi and ffi with variable-width fonts, but the rest is geekery (which is fine in itself, but not practical).

With print, you have to think about kerning and the flow of the ink, and the DPI of the printer, and many other variables, and some ligatures help with that (fi). Then there are some letter strings that appear consequently very often (e.g. st), in which case if you're cutting your fonts out of metal cubes, it's practical to have a single character for those strings. They are not, basically, of help to the reader, but instead to the typesetter / the machine. But you don't spend ink or metal on a computer screen, so the ligatures are just there for the sake of it.

With monospace fonts, well, because there's no kerning (each character takes up equal space), there's no way that normally any bits of the letters could coincide, so all the ligatures are forced and artificial there.

Coding font ligatures mostly are meant for symbols though. Examples (linked for the example images there):

- The submitted font - scroll down to "Ligation sets" https://be5invis.github.io/Iosevka/ (note that they only show symbols)

- https://github.com/tonsky/FiraCode

- https://github.com/i-tu/Hasklig

I think people using a programming language with a more math-like notation probably benefit much more than those using "normal" languages.

Monospaced fonts simply mean that the horizontal width is constant. While this also means there aren't any kerning pairs, it is a different concept. Simply disabling kerning does not mean a font is monospaced.

Kerning is a table of pairs that allows them to have more aggressive advance values. For example, with a sequential 'V' and 'A', the 'A' could be moved closer to the 'V'. But kerning doesn't have anything to do with the fact that in a variable width font that 'I' is narrower than 'X'.

And did I say otherwise?

I guess I took your statement, "because there's no kerning (each character takes up equal space)" to mean "no kerning means each character takes up equal space". Maybe that's not what you meant with those parenthesis.

Oh, I meant each character's taking up equal space did not allow for kerning. I see that I've not phrased that well, sorry.

Probably old fashioned, but when I type '->', or '==', for example, I want it two be the two characters, and not become something else visually.

Maybe I should give it a try again though!

Not the parent, but I’ve had an issue where the fi ligature occupies just one character width, which looks very wrong with an otherwise monospace font. If the ligature is done right (resulting glyph is double-width), then I would probably like it.

Iosevka does not have `fi` ligature. The "Term" variant is used for some restricted environments, like some Linux would think that Iosevka is not monospace due to it has glyphs wider than one space.

Good design choice. To be clear, my issue was with another font, not yours.

Could you post your font files? I am unable to run this make command as it is broken in the latest build. Thanks so much!

I went through the build process — fascinating. Repo with the customized output files: https://github.com/kabootit/Iosevka

Also some instructions for getting it going in VS Code.

Never been a fan of narrow fonts but I'm sold on this one.

Thanks so much!

What color scheme are you using there?

It's just the default One Dark theme from Atom, I believe.

I like trying new fonts for coding. So far I went back to my favorite DejaVu Sans Mono as I can legibly use it for coding at size 8. On my screen I can see 65 lines of code. When I tried Iosevka it does look good, but at size 8 it's legibility is not as good as DejaVu, it is about 20% more narrow (which is not too important to me), but it can fit just 60 lines of code on my screen. Less code and less legibility than DejaVu, so I'll pass. But I do love that there is a selection of high quality fonts for coding nowadays.

Leading and width is configurable, actually :)

I might not be very advanced user. Configurable how? When generating fonts? Or in an editor? Most editors that I use do not have these configuration options.

I'm sure if you can do it with a `make custon-config` command, but here are the changes one makes to the parameters file:


Why do you want to see more lines of code on the screen? I hear that argument frequently, but I'm on the other side this. I use Fira Code size 20 (with line spacing 1.1) in IDEA - it means about 40 lines of code.

Below are my arguments for this.

I prefer to see less code on the screen so I'm forced to split the code into more methods/functions -> make it more readable as a side effect.

More over smaller font means you strain your eyes more.

Write big, read small.

I found it too tall, like many other similar fonts. Usually source code is not too wide horizontally and limited to 80 characters so making characters more wide and less tall allows to fit more to screen.

However it looks good and may be useful for those who prefer to open more that 2 columns of code in editor, or users of tiling window managers.

Liberation mono is my favorite, however Menlo from Mac Os looks good too.

I doubt this is going to replace Ubuntu Mono for me (so many fonts have tried, and so many have failed). But it's my duty, and my obsession, to give it a shot for a few days. So I'll spend some quality time with this on Monday. Whether it does or doesn't succeed in dislodging UM from my bosom, thank you very much for the effort you've put in. This is how progress gets made.

I'm also stuck on Ubuntu Mono. Tried a few 'coding' fonts and ones with ligatures but it's hard for me to adjust.

Very nice; I find Input Mono from Front Bureau to be a bit more readable, though: http://input.fontbureau.com/preview/?size=20&language=python...

I love how you can choose your flavor by web app and just download resulting font. No need for building it by yourself.

You're right, that's nice. However, Input is proprietary and requires agreeing to a _rather restrictive_ licence to download and use...


I don't find this license very restrictive. You can use it for personal use as much as you want.

You can't put it on websites or use it in software you give out.

Seems fair to me.

I am wary of licenses which attempt to narrowly define things like personal use with language that is incredibly legally vague.

> For the purposes of this License, Personal Use is defined as any use on your own computer that involves computer programming, software development, or the composition of plaintext documents in personal, professional, or non-professional contexts.


> composition of plaintext documents

just composition? What if I print it? Can I use it in a presentation? I would rather not agree to language which seems to imply a future requirement to purchase some "other" licence if I trigger any of those clauses.


It's a readable font but the 1 is too similar to the l for my taste. Iosevka has a 1 with no horizontal line at the bottom.

I don't know what it is about this font but it doesn't feel monospaced.

Using this font I constantly keep second guessing myself as to where I've placed whitespace. Maybe I just need to use it more, I don't know.

Maybe this is related – from https://github.com/be5invis/Iosevka/releases:

    Spacing: How wide some specific characters are.
        Default: The default variant with ligatures and semantic full-width glyphs.
        Terminal: Exact monospaced font without ligatures and full-width glyphs. Since some environments cannot interpret Iosevka as monospaced, and have difficulties with ligatures included, you can use Iosevka Term as an alternative.

Glancing at it I'm not sure if I would immediately be comfortable with it - it's a much narrower glyph than the type I'm used to.

I think the lower width:height ratio is part of your whitespace issue, combined with the seemingly liberal kerning.

If anyone uses narrower fonts so they can see more on a single screen, here's exactly what you need: http://dotsies.org — It's a mysterious dot font that is not braille. Have fun (spoiler: I didn't succeed to use it).

That is cool. I wish it wasn't dependent on the vertical alignment so much (e.g. if you have a single character, you can't tell an 'a' from a 'b' from a 'c' -- heck if you have a 'ab' that could also be a 'bc' or a 'cd'). Maybe it matters less in practice than I think.

In the previous discussion[0] on Dotsies, someone posted a modified version which tries to address this issue, as well as a few others:

"dotsies 3" http://esploded.s3.amazonaws.com/anon_data/2012/e5YO-dotsie3...

[0] https://news.ycombinator.com/item?id=3601687

Wow, thanks for sharing!

Didn't expect such enthusiasm. Out of curiosity: Are you trying to learn it?

I will most likely create my own at some point. In the previous discussion there were some interesting suggestions for improvements.

eg. http://esploded.s3.amazonaws.com/anon_data/2012/e5YO-dotsie3...

In terms of creating a space-saving reading system, I think a better place to start would be with the writing system itself. Dotsies squishes letters but does not remove them.

I propose a system where each word is reduced to its minimal representation, eg. where letters are removed until the smallest unique form is found (giving more common words shorter forms).

Once I have such a mapping developed (for both reading and accelerated writing) I will see if something like dotsies still makes sense.

In any case I will not use squares: they make my eyes sad. Maybe circles :)

> Glancing at it I'm not sure if I would immediately be comfortable with it - it's a much narrower glyph than the type I'm used to.

This. I occasionally try new dev fonts but so far I still end up using Menlo and/or Consolas.

Menlo is underrated. It'd be cool if it saw major longevity of use like Monaco before it.

That matches up with my initial impression as well. I'm coming from Fira Code, which I've been using for a while now and really love. The glyphs are noticeably wider, but to be honest, after using Iosevka for the last half hour or so, I'm kind of enjoying the compactness.

It's the first narrow typeface I haven't rejected immediately for writing code. I ran into what looks like some issues with certain ligatures not being substituted, but that looks to be an editor-specific issue. They're fine in Terminal and vim, but Atom had some issues with some (e.g., <--> <*> <.> and others along those lines). I will say that Fira Code seems to have a more diverse set of ligatures,[0] though some of them--the equality glyphs in particular--were annoying at times because they were such a visible change over what you actually typed.

0. https://raw.githubusercontent.com/tonsky/FiraCode/master/sho...

it's a much narrower glyph than the type I'm used to.

Exactly this. Maybe if I'd be staring at it for days it would be ok, but right now it feels uncomfortable to read, to the point I'm probably not even going to try. Then again, just like the other commenter I always come back to Consolas or something so similar that it's hard to distinguish.

On a sidenote: what is the font is this textbox I'm typing in?

> On a sidenote: what is the font is this textbox I'm typing in?

Can’t say. The stylesheet specifies ‘monospace’, so the font is whatever your browser’s default monospace font is. For me, it’s Courier. But yours could be anything.

If you open developer tools on chrome, under the computed tab, the very last panel will tell you what font it used to render the glyphs inside the element you inspected.

I felt the same way at first, but I got used to it very quickly. Now I can't switch back, all the other fonts seem bloated and wasting screen real estate.

In fact, it's so much more space efficient that I can fit three code files side by side where I used to be able to fit two.

I felt like that when I dropped my standard monospace font size by a couple points. Now I can fit three files side by side and see more lines at once.

if you've not tried it already take a look at "M+ 1M light" - I run it at quite a high font size - it's similar but less ornate to Iosevka

on the whitespace - Sublime and Atom have a setting to put an unobtrusive dot or line which I find useful

Another reason to use tabs...

Every time you press tab and your code editor actually inserts a tab, we are 1 step closer to the outcome from Terminator.

What where the terminator is killed and everything turns out ok?

Unless the machines figure out how to subvert time itself which is what happens, all because of carelessness on the part of developers and their insistence on tabs.

tl;dr: "from code" refers to the fact that you can regenerate the font with your own parameters.

Cool image in the readme showing a bunch of different styles inspired by other fonts: https://raw.githubusercontent.com/be5invis/Iosevka/master/im...

Thanks for commenting with this. It was really the only thing I wanted to learn about this font and came to the comments first.

Finally a font which thinks about other latin based lanuages, and even cyrillic and greek, not only English. Some fonts do this, but few take care to show it in their marketing material.

Thumbs up for the examples and not ignoring the rest of world! (personally I find the fonts too "narrow" fow my use)

Actually, it does pretty much ignore all other languages given its width. They did it as narrow as possible (with latin letters) and just shoehorned all others later.

> Finally a font which thinks about other......but few take care to show it in their marketing material

Almost all commercial fonts do this. Just take a look around.

P.S.: using a slightly wider font (15% wider) produces much more readable result http://vkote.com/i/2017.04.01/00007d34/losevka-vs.png

They do take consideration about non-latin languages. For example, a Chinese character in this font has exactly twice of the width of an English character, which makes sense

CJK glyphs are always double width, there is no other way around it.

Not a lot of fonts respect that though.

That's the case for Pragmata Pro which this font was 'inspired' by.

Iosevka is indeed a very pretty typeface. I've been using it for a while now and been really enjoying it.

Here's some Dafny code for your viewing pleasure: https://i.imgur.com/clxUR1y.png

How do you get the ligatures to work with vim? I've been trying to wrangle PragmataPro and gvim for a while but haven't managed yet.

If you use vim in the terminal, ligature support just depends on the terminal emulator. In Linux, qterminal and konsole work.

I like the use of ligatures to write <= as ≤

I disagree; if you want ≤, use ≤.

Oddly, Iosveka currently doesn't provide (for instance) ⇒ or ⟹, according to the specimen sheet, even though it contains ligature-derived glyphs that look just like ⇒ and ⟹.

I want ≤ but I don't want syntax errors in my code.

Well, yes. For some languages we'll need to wait for standards committees, but there are a number of popular single-implementation languages that really have no excuse.

Which color scheme is that, if you don't mind? I always keep an eye open for pleasing colors :)

Of course not!

The color scheme [0] is my fork of tango-plus [1] with a few small changes.

[0]: https://github.com/aminb/tango-plus-theme

[1]: https://github.com/tmalsburg/tango-plus-theme

I'm surprised there are no comments here about the code! It looks like the characters of the font are specified programmatically on top of a self-contained glyph-drawing library, all written in a custom Lisp dialect ("patel") running on top of node, written by the same author as the font. Really impressive!




Do you know that all letters in Iosevka are EXACTLY 1/2 em wide?

For ASIAN users, you can use THIS and preserve your perfect alignment.

So the "m" glyph is half as wide as itself?

The em unit is traditionally the width of the letter M, but these days you see it used as the unit height of a font. IIRC, CSS is like this.

Thank you for posting this!

I purchased the Essential version of PragmataPro™[1] because I love a narrower monospaced font for terminal windows and editors... allowing for a better use of horizontal screen real estate.

Having something that is this configurable—including the leading—is fantastic! I will definitely give it a try.

One thing that may make me stick with PragmataPro is the fact that Fabrizio has hand-optimized the screen display for over 7000 characters from 9pt to 48pt to guarantee the best possible readability... no weird rendering artifacts. It's amazing, but unfortunately many people are "put off" on the idea of paying for that kind of attention to detail.

In any case, thanks for offering this free variant of a customizable, narrow terminal font!

P.S. does it have the Powerline[2] characters?

[1] https://www.fsd.it/shop/fonts/pragmatapro/ [2] https://github.com/powerline/powerline

Yes, it does.

I would really like to see a san serif proportional coding font with coding ligatures. I've tried to hack one up myself but I could never figure out the tool chain for it.

I feel this font more thin that I'd like, at least in linux.

I am currently using Source Code Pro. I find it very nice to use as my daily driver.

If I'm working on a hi-dpi display (most of the time I am), Source Code Pro is my font. It's not a great font at small sizes though.

  brew tap caskroom/fonts && brew cask install font-iosevka

A lot of programmer fonts feel too wide for me. I think I will give this a try . It looks beautiful and it's open source .

I've been using Monoid for a long while now and am surprised not many people have heard of it or are using it. Monoid is very similar to Iosevka . Similarly you need time to get used to it, but when you do don't want to go back. I have not used Iosevka, has anyone used both Iosevka and Monoid and can compare them?

The slight curve to usually straight letters like 'v' and 'k' reminds me a bit of of Inconsolata. I really like this touch and makes a monospaced font flow. Is it also using Spiro splines?

My favorite for coding for a couple years now: http://sourcefoundry.org/hack/

I switched to this and it does look nice: https://snag.gy/rFSpig.jpg

I was thinking it was an odd choice to post a jpeg image of a font screenshot, but that site seems to serve PNG images with a .jpg extension... odd!

Yeah I rarely post images online so I used the first google result. Later I realized imgur might be the better choice.

Posted another image here: http://imgur.com/a/14l3y

I've got used to SF Mono lately, looks really nice in terminal, and goes along with Fira Code when I change to it in Emacs GUI.

Iosevka is awesome! I've been using it for a while now. I started with inconsolata, went to anonymous pro, and then iosevka. I'm very happy with it. I like the fact that it's narrow because now I can have my editor split in three.

Lately I've been trying out operator mono. Still not sure if it will win over iosevka.

Very good job be5invis!

I always like trying new monospaced fonts, but every time I always get back to Fira Mono / Fira Code.

I like the way it looks, but I discovered that while I can use SF Mono at 11 points, I have to bump up the size of Iosevka to 12 to avoid eye strain. The result was that while I could squeeze longer lines on screen with Iosevka, I get more lines with SF Mono. Back to SF Mono.

I've been using iosevka (regular and thin) anywhere I have to read a whole lot of content, which in my case is within atom editor, terminal (vim), and irc client (quassel). Iosevka is a feel-good font. The regular and thin styles are very nice. ^_^

Slightly OT.. Does anyone know the font used in the screenshots here? https://github.com/owainlewis/emacs-color-themes

I think it's Menlo, going off the lowercase 'i'.

it isn't exactly, lowercase 'i' differs very slightly. closer to Monaco Style in that respect.

Daily user here. One of the few narrow monospace fonts. Previously, I've used pixel fonts like Dina or the proggy fonts suite, but with higher resolutions this has become unsustainable.

It is a really good font, however, it just doesn't work for me on terminal & terminal based applications. Somehow I find that there is too little spacing between the lines.

There's one and only font that truly "works" in terminals IMO, and that's the classic VGA 8x16.


I'm a fellow user of the VGA font in terminals, it's just so satisfying to use! On text editors I use the default font, though

Many terminals have an option to add space between lines.

My favourite programming font by far is Monaco, which is unfortunate as I develop on Windows.

I find most other fonts kind of jarring especially at larger sizes, it's hard to explain.

comparison with other monospaced fonts: http://www.s9w.io/font_compare/

Your version is outdated.

I tried it with powerline, but the characters don't align properly, the arrows are 1px higher than the other characters.

nice work. a large family like this is very well suited to be a variable font[1] -- even the slabs could be an axis.

1. https://blog.typekit.com/2016/09/14/variable-fonts-a-new-kin...

To be honest, Iosevka is not suitable for the current VF specification, because that it does not support changing glyph topology while changing parameters.

anybody figured out how to compile it with powerline fix?

How does this in your opinion compare to "source code pro" from adobe?

How do Stylistic Sets work?

I like how ss08 looks.

Is there a Iosevka ss08 font download, or must I build it myself?

It's a feature of the font. For example in TextEdit, in the Font panel, you can open Typography window to adjust different stylistic sets.

Interesting, thanks! Anyone knows how do I chose it in Sublime Text on macOS?

Does any of Linux terminal emulators support fonts with stylistic sets?

Nice font, but too tall and thin for me.

It is a really pretty font.

I don't code in monospace typefaces. Useless to me.

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