Monospaced Programming Fonts with Ligatures
hanselman.com
hanselman.com
I guess I'm destined for hell or purgatory then.
Hanselman is not alone. I had the CEO of one company look over my shoulder and ask, "Mike, I don't understand how you can program in a proportional font. How can that possibly work?"
He wasn't interested in the answer, he just wanted to make a point to me and our teammates that what I was doing was weird and wrong.
I would hope for people to have more intellectual curiosity than this. One of the best ways to learn is to let your assumptions be challenged: talk with people who do something differently from you and find out why they do it.
It's been said that a programmer should learn a new programming language every year or so, and especially learn a new kind of language that will teach you different ways to think about code.
Similarly, I think every programmer should try coding in a proportional font, at least for a while. It may show you new ways to think about how you format your code, as it did for me when I got curious many years ago and tried it.
For example, it cured the bad habit I had of lining up too many things in columns, like this:
myFunctionThatDoesStuff(someArgument,
andThisCalculatedOne(anArgumentThatMeansSomething,
anotherWordyName));
Obviously that won't work in a proportional font, so it forced me to try this instead: myFunctionThatDoesStuff(
someArgument,
andThisCalculatedOne(
anArgumentThatMeansSomething,
anotherWordyName
)
);
This indentation-only style has many advantages, and of course it works just fine in a monospaced font too. In fact the Rust/Servo team recently switched to it from their former column-aligned style.I don't like this style either, but it's a style not a "bad habit."
Point well taken. But this was just a personal observation. If other people use column alignment, it would certainly be presumptuous of me to call it a "bad habit"!
For me, though, it was just that. I had no real reason for it other than having always done that way, and it was really starting to get in the way. So I was glad to be done with it.
It means constant readjustment and unnecessarily bloated diffs every time you change a function or variable name.
or the lovely
foo := a;
bar := b;
then a day later foo := a;
bar := b;
foobar := cd;
which also points to the problem that it lends itself to premature constant readjustment because a day later you have to move every thing again because as it turns out you really needed foobarlist as well. and each time you end up with a diff reporting that foo and bar (and then foobar) have changed too.It's making busy work for yourself and ruining the usefulness of code review tools.
ALSO alignment vs indentation is the whole reason we have to have the spaces vs tabs argument.
Indeed, that is one of the things I like about the indentation-only style. Unlike column alignment, you can use either spaces or tabs for indentation and the formatting still comes out fine.
In it, they make a really good argument that humans simply shouldn't be doing this type of formatting work. Let the computers do it, clang-format can get it right every time in a fraction of the time a human can.
Pick whatever style you want, let the computers deal with it. I quite like this, now I just write a big long single line, hit a button and have it fixed for me.
It's not a bad habit if it looks better and doesn't involve any time investment.
Your variable example is the thing that peeves me most about golang, since gofmt insists on aligning consecutive variable names and types in that columnar fashion.
Many GUI apps actually do that but unfortunately not your typical diff or git which insist in dealing with full lines only.
Somewhat related, if you're looking at a diff on GitHub and want to ignore whitespace, you can just tack on `?w=1` to the URL (https://github.com/blog/967-github-secrets).
javascript:(function()%7Bopen(location.href+'?w=1');%7D)();void(0);
Maybe no formatting characters should be allowed to be saved embedded in source code, and instead presentation filters should handle everything related to formatting, documentation, etc.
It might work..
If needed allow your editor to have a task to reformat a code file on Open to apply formatting you desire vs the teams or project guidelines.
Also, I'm curious. I want to see how the code looks like. I want to know what are the downsides of monospace and the benefits of proportional. The one you cited isn't too much of a deal, since it is just a habit you can create using monospace still.
Because I don't know of a way to get HN to format text in a proportional font without losing the line breaks. Believe me, I've tried. :-)
> Also, I'm curious. I want to see how the code looks like.
I am glad you are curious about it!
> I want to know what are the downsides of monospace and the benefits of proportional. The one you cited isn't too much of a deal, since it is just a habit you can create using monospace still.
Indeed, and now that you mention it, I'm not entirely sure which happened first. I may have switched to the second style with indentation instead of column alignment before I started using a proportional font, just because I was tired of the excessive line lengths and always having to fiddle with the spaces.
Regarding the downsides and benefits, will it sound like a cop-out if I say it's just something you have to try for yourself?
Part of my preference for proportional fonts isn't even tied to any rational reasons. I spend much of my day looking at code, and I just find proportional fonts easier to read, more beautiful and pleasant to look at. But beauty, of course, is in the eye of the beholder.
Edit: crap, doesn't work
Test unicode non-breaking space.
Test unicode narrow no break space.
Test unicode figure space.
EDIT: So there you have it, if you want a non-breaking space on hackernews, use unicode's figure space or narrow non-breaking space. Apparently they already filter out the normal non-breaking space.
var calculatedOne = andthisCalculatedOne(anArgumentThatMeansSomething,
anotherWordyName);
myFunctionThatDoesStuff(someArgument, calculatedOne);
Edit: That "anotherWordyName" is supposed to be column justified, HN really needs <code> tags instead of this indentation nonsense.The extra vertical space is easily worth the increase in readability IMO.
I've never touched proportional formatted code beyond a day or two when I was forced to by my environment, and all I encountered was more annoyances in getting my code to align properly. I'm glad you found some benefit, but I'd argue those benefits could be achieved any number of other ways.
Oh, I agree completely that step-by-step is often more readable than deep nesting.
OTOH, your example is a good illustration of the problems with column indentation. If it hadn't been HN's goofy code formatting that messed you up, it would have been some code refactoring that changed the length of one of those variable or function names.
I know, and I apologize for hinting that you of all people may have lacked intellectual curiosity! That comment was really directed toward the former CEO of mine... :-)
Actually I'm glad you put in that little joshing swipe against us proportionalites, as it gave me an excuse to have some fun exploring the topic.
Well, that's a good way to get a head start on the "hell or purgatory" thing, isn't it! :-)
I'm not saying every kind of code is suited for a proportional font. If you use ASCII art, or if you are writing out two-dimensional matrices or the like, a monospaced font will serve you better.
The kind of casual and unnecessary column alignment in my first example is what I was talking about. The second (indented) example is perfectly readable in either a monospaced or proportional font. So if you run across it you hopefully won't need your baseball bat.
Jetbrains editors have it built in (change some settings and then ctrl+alt+l does it for you.) Sublime, VSCode, Atom, etc.. all have prettify plugins.
Aligned code is easy to read code. Aligning code is a pain in the ass. A good code editor once again saves the day (and man hours!)
But that's basically hardcoded tabular data, and should really be solved by an editor with proper tab-stops. Not by abusing the monospaceivity and spaces for alignment.
That’s the crux of the issue for me.
I can think of many ways I’d like to present code in my idealised programming language(s) that would use significantly more advanced layout and typography than today’s typical environments.
However, I wouldn’t actually want to use any of them unless my programming tools all supported them properly. That means the editor, but also the source control and diff tools, the code review and bug tracking systems, and so on.
In the absence of any standard conventions for how to represent that extra metadata in an underlying format as robust and flexible as plain text, it’s hard to see this ever happening, though I imagine it would be fun to try.
What advantages are there? I could never see it working for me. I want a program to format my code with resonable defaults and be done with it.
As you say, use automatic formatting and you don't need to worry about line-length. (Otoh, having a mandatory max line length makes about as much sense as having a max identifier length or a max lines per file.)
A second reason is that it prevents nesting as a side effect. You are forced to make methods and don't go into nested if/for. Much easier to check for our (custom) linter than verifying for/if nested loop depth.
Oh, Turning on word wrap is evil...
Line length guide lines makes sense for me as a visual indicator of what will wrap when I hit the max lines per file. They are also nice ways to gauge when you are nesting too deep or making overly complicated expressions.
Max line length allows you to do nice things with window management and diff tool layout and not spend forever moving around to see the text. I am a convert after thinking it didn't matter. Now it being 80 characters is arbitrary but so would almost any other number be.
Not if you use an indentation-only style like my second example. One of the great things about that style is that it looks the same on anyone's machine, whatever kind of font you use.
If you read some of my code, you'll never know that I wrote it in a proportional font. It looks the same if you view it in a monospaced font.
> How would you display a guideline to make sure you were under a characters-per-line style?
Most programmer's editors have more than one way to do that. There is usually a column number in the status line, and some editors can be configured to change the background color on any part of a line that exceeds your required line length. That works with any font, and it's visually less obtrusive than a red vertical line partway across your editor window.
Also, an indentation-only style naturally leads to much shorter line lengths. If you compare my two examples above, the column-aligned version extends to column 77, while the indented version only goes to column 40! That's barely half the line length for the same code.
In practice, I think a lot less about line length since I switched to the indentation-only style, since my lines of code tend to be so much shorter as a result. And I tend to write the simplest functions I can without excessive nesting, so it's pretty rare that I come close to any worries about line length.
> What advantages are there?
For a proportional font, I simply find it easier to read and nicer looking. And as I mentioned, it also helped teach me to use indentation instead of column alignment.
I'm not saying you or anyone should necessarily convert the the Proportional Church, only that it is a worthwhile exercise to try it for a while.
For the last couple of years have been using Trebuchet MS. It's not designed specifically for programming, but it has many of the attributes of a good coding font, in particular all of the easily confused characters like 0Oo and 1Il are easily distinguished.
The one thing I don't like about Trebuchet is that it has a really terrible tilde (~). Sometime I will sit down with a font editor and swap in a better tilde.
I tend to use largish fonts on a high-DPI display, and Trebuchet really looks nice with that setup, both on Windows and macOS.
Someone else recommended Input, which is designed for programming and comes in both proportional and monospaced variants. When I tried Input it didn't look as nice as Trebuchet MS to my eyes though.
That will give you a few to try out!
(let ((foo 1)
(bar 2))
(print foo)
(print bar))
The (print ...) statements should just be indented two spaces, so you don't need a monospaced font for that, but the bindings should be aligned... "(let (" in a proportional font generally won't have the same width as 6 spaces.How do you deal with this?
That being said the idea that a programmer being resistant to changing their font style is indicative of general intellectual laziness is one of the most laughable things I've ever heard. I'd be more convinced if someone told me that refusing to change syntax highlighting themes implied you're a bad programmer.
Let me just mention that this isn't what I said at all. I don't blame you for misunderstanding, I must not have explained my thoughts clearly.
I didn't say anything about intellectual "laziness", and I certainly didn't mean that someone who didn't want to change their coding font was intellectually lazy.
I was talking about intellectual curiosity, specifically with reference to my former CEO who questioned the sanity of anyone who would code in a proportional font.
Instead of wondering why someone would make such a non-mainstream decision and being even slightly interested in their reasons for it, he simply dismissed it out of hand as the bad habit of a weirdo.
That's the lack of intellectual curiosity I was talking about.
However, I would not take this kind of instance of intellectual laziness to be indicative of a more general complacency when it comes to ideas, tools, or self-development more generally.
By contrast I think intellectual curiosity is a great thing when present and lamentable when not, but I don't think it's a prerequisite to be a good professional in almost any field, including programming related ones.
Try using a tab-size of 3 spaces.
Does anyone have a recommendation? I'm having trouble finding anything at the moment.
I mentioned that I had hear of some fonts that were specifically made for people with dyslexia, so he downloaded one and tried it out. There was an almost immediate improvement in his output of code, and it was always interesting to go read over his shoulder and see things not-monospaced.
Personally, I only stick to monospaced fonts, but I wouldn't be totally opposed to trying something else. I even tried dotsies for a while (http://dotsies.org/) but could never get used to it and it slowed me down too much.
rotationMatrix = [[ cos(x), -sin(x), 0],
[ sin(x), cos(x), 0],
[ 0, 0, 1]]Your example is interesting because it combines two different kinds of alignment. One of them I find unhelpful - pushing everything to the right to match the length of the variable name. The other is the useful alignment within the matrix. So personally I would make this minor change:
rotationMatrix = [
[ cos(x), -sin(x), 0 ],
[ sin(x), cos(x), 0 ],
[ 0, 0, 1 ]
]
Now you have the nice matrix layout without having to realign the code if you ever rename rotationMatrix.My font right now is Iosevka: https://be5invis.github.io/Iosevka/ A font generated from its source code. You can build your own variant. It has ligatures as well.
I like that it’s not as wide as many other monospace fonts.
I do like it a lot, but find myself going back and forth between it, Fira Code, Pragmata Pro and Operator Mono.
Exception: all my spreadsheets are in Consolas (an universally available font in Windows environments).
To each his/her own, I guess.
For instance, in the examples from the article, the == and -> ligatures in particular look like something I might not always see as two characters.
Otherwise we wouldn't even be discussing typefaces.
Look at the "!=" ligature in the Fira Code example: it's a ≠, but it clearly takes up 2em of width.
What? I can't understand how such large font people can function. I mean, how large (or dense) are your screens? Is that a Macbook thing?
I'm at... something small. Hard to tell exactly, because on my laptop screen, all following fonts look pretty much the same size, while having different configured values:
- IntelliJ - Monospaced, size 12
- Emacs - (:family "Hack" :foundry "unknown" :slant normal :weight normal :height 76 :width normal)
- xterm - xterm*faceName: Hack:size=8:antialias=false
So 8 / 12pt (which one is pt?) and/or 76 somethings. People at work say I'm crazy working with such small text, but frankly, anything larger for me feels like wasting tons of vertical space, which is of short supply given the (IMO completely idiotic) market standardization on 16:9 and 16:10 displays.
Any presbyopic developers care to chime in on what the experience is like? I'm 40, so mine could cross over any time now.
I hate 16:9 too. Please give me back the bottom of my screen that you chopped off.
With 16:10 screens however I think it work rather well, I currently use three 1920x1200 monitors and two of them are vertical, it looks like this: https://svkt.org/~simias/emacs-vertical.png
It's also great for looking at docs.
Well, heck, you shouldn't be programming at all. You're much too old.
(And in case your irony detector is broken, I'm 52.)
Your neurology adjusts pretty quickly. The first few days, your field of view feels limited. After that it feels normal. It was a delight to adjust my font sizes down on all my devices, back to what I would have used at 30 years old.
Code and web browsing (which is really just walls of text) goes on the tall one, everything else on the other one.
The new 15" TouchBar MBPs can drive two 5k monitors. It's amazing for work. Seriously.
For example, I can use a 12pt font on my macbook pro's screen, but have to go up to 16pt on my 4k display at home, and down to 9 or 10pt on the 1920x1024 screens in the office. It's a pain, but... <shrug>
Instead, if you really want to compare font sizes, compare either the height relative to the window, or actual size on a ruler held at arms length while at normal viewing distance. That way you can measure the arc-height of the font - something that translates much better with such a wide variance in displays.
My fonts, corrected for device, all end up being around 1/8" ( tall (for capital letters) on a stick held at arms length.
Depending on your eyes that would be entirely reasonable on an 18 inch lapzilla or preposterously tiny on a 9 inch ultrabook.
That’s... false.
With correct DPI settings – determined by measuring – the same font size equals exactly the same physical size.
That said, I turned off the OS scaling on Windows because apps that didn't support it got scaled by image scaling which resulted in unpleasant blurry messes. As for Linux, I don't think XFCE supports it at all.
On my work rMBP I also use 16px min, even with the OS scaling turned on.
When I was a teenager I used to use 10px fonts, but I tend to use displays at more ergonomic distances these days.
An example from some lua code I'm working on at the moment:
local hi = buffer:bitfield(4, 4)
local lo = buffer:bitfield(12, 4)
return bit32.bor(bit32.lshift(hi, 4), lo)
I find that aligning things not only looks better but also makes the differences more obvious. Same code with a proportional font:local hi = buffer:bitfield(4, 4)
local lo = buffer:bitfield(12, 4)
return bit32.bor(bit32.lshift(hi, 4), lo)
It's not a deal breaker (and the offset is small in this case) but I much prefer the monospaced version. Obviously it might also be "Stockholm syndrome" after decades of coding with a monospaced font, I can't say I've really given proportional fonts their chance.
Also many proportional fonts make it hard to distinguish between Il1 or O0, but I guess you could design a proportional font that doesn't have this issue. What font do you use yourself?
The inability to do vertical alignment outside of the left edge of the line is a bit annoying, but honestly I don't miss it that much. If you have enough code that you really, really need to do that, I find it's a code smell indicating that something likely needs to be broken into smaller pieces anyways.
Another thing I'm considering to adopt from ST is dropping syntax highlighting. If research on highlighting for natural language can be transferred to code (I'm not entirely sure, but I suspect it might), highlighting might actually be harmful to comprehension. The only thing I'd keep is a slightly lighter colour for comments, as these don't have quite the same status as code. Ideally, I think I'd like to have them deemphasised by moving them off to the margin or something like that, but that requires rather more work than rendering them a lighter colour than the rest of the code.
Interesting. Could you share some of that research and its conclusions?
Of course, there are several possible error sources (unfamiliarity with the colouring scheme for example), and whether this can be transferred to reading code is an open question. But I still think it's important to keep the existence of this kind of research in mind when discussing this kind of question (and also the similar question of mouse-driven interfaces vs. keyboard shortcuts), as it easily devolves into strongly held opinions and arguments along the lines of "it stands to reason that $opinion-held-is-true"
In code, I'm frequently tracing back and forth through a block, looking for specific information in different lines. I think that the coloration helps to provide "landmarks" for non-linear traversal of the code. I'd consider color-free code to be more similar to un-punctuated text, than I would consider colored text to be to colored code.
I've tried to look at code without highlighting and I can't read it because the color gives me additional context (metadata?) about the code.
This is one reason I'm a fan of Douglas Crockford's slightly unorthodox style of always beginning comments in column 0, rather than indenting them along with the code. This helps, to a small extent, in differentiating comments from code. Example: https://github.com/douglascrockford/JSLint/blob/master/jslin...
Ideally, I'd prefer to float them to the right margin (suggesting the Lisp style of line comments starting at column 78 or thereabouts, I guess), but this is an acceptable compromise. At first blush it seems to break the flow of the code a bit too much, but I'd probably get used to it reasonably quickly, especially in conjunction with grey comments and black text.
[1]: https://wiki.haskell.org/Literate_programming [2]: https://ghc.haskell.org/trac/ghc/wiki/LiterateMarkdown
I've dabbled with it and enjoyed it, but I really feel like it needs editor support to feel truly fluent (i.e. being able to preview the formatted version on the fly, being able to collapse the text blocks, etc.).
When I write code that reads more like long-prose, then I do prefer proportionally-spaced fonts myself. This is generally characterized as code with a low density of variables and constants, and lots of control and data structure manipulation. However, when I write code with lots of objects, I tend to prefer monospaced fonts. This is because my personal aesthetic style is to line up groups of related entities and logic; an IDE that gives a modern example of doing this is Eclipse [1].
For IDEs I have to use for a specific project that don't support such formatting, Emacs makes this easy to re-flow so adding a new variable, shortening or lengthening an existing one is still quick. The impact upon version control is still annoying, though; AST-sensitive merge/diff/version-control can't arrive soon enough for me. Fortunately, my code is not regularly inflicted upon others within a team; when I do have to work within a team, I put up with not carrying out my personal preference and use the code formatter that comes closest to the team's formatting standards before checking in.
I do this because it helps me read my own source code quicker. Blocks of entities and logic related by domain and not intrinsically related through the language itself happen to be easier for me to read when I line up like this.
This all goes back to a phase I went through a long time ago when I tried to figure out how to adopt literate programming in all my own work, within the context of an integrated single-source publishing, version control, testing, training, and problem management environment. In my mind's eye, I imagined all the media and activities surrounding a software product related back to the code in some manner, with the code displayable in different contexts based upon the AST and domain-specific hints, and when I made a change in either, I could see and manage the change in the network of related nodes. So if I change how a GUI behaved, then the parts of the User Guide that reference the old GUI, list of users who logged problems documenting confusion about that part of the GUI, etc. would all be automatically flagged. The User Guide would automatically get updated graphics content available from the GUI testing as soon as the testing data was built, the training material as well, and the users would get a note from the support team when the next version was released, detailing the change. I eventually decided that mountain was one I wasn't going to grind down myself anytime soon, so my code formatting is one of the many small ways I preserve that ideal.
[1] https://stackoverflow.com/questions/13936569/eclipse-auto-al...
What I would like is a language-aware editor that can visually align assignments, parameters, etc. without touching the actual whitespace characters. You get 1 tab for indentation (if the language allows tabs) and 1 space for alignment, and the editor takes care of the rest. The raw text would still be readable enough and use fewer bytes for people who prefer to code in a monospace terminal over SSH over an acoustic coupler from a phone booth in rural Texas.
I really, really wish this was available in the editor I fight with every day.
There's a good-sized category of things that have a bit of an adoption cost that I'm assured is worthwhile, but that I don't see a really solid reason to commit to. Proportional fonts is one of those (for me).
[0] : https://github.com/tonsky/FiraCode/issues/162 [1] : https://github.com/mozilla/Fira
It looks odd only because we're accustomed to seeing the individual characters due to display limitations inherited from typewriters and TTY machines.
Heck, a lot of people I know will make a verbal ligature of www - something like 'dub dub dub'.
In a way I am interested in psychological basis for my innate rejection of this. Conceptually, I comprehend why it is made into it's own ligature, like !=, it is a unit of information these days.
If anything I think it makes more sense to have :// as a ligature.
Yep, the ampersand symbol "&" originated as a ligature for et, Latin for "and". You can see this more obviously in italic families and some fonts expose a more fancier variant as well. Example: http://i.imgur.com/Rsmmql9.jpg.
After using Fira Code for a while, I can say code looks weird without it. Especially plain === and => look really jarring now. The ligatures also help me spot typos!
Regardless of the ligatures, one of the cooler things about Monoid is how it tries to fix kerning problems inherent to monospace fonts:
https://medium.com/larsenwork-andreas-larsen/class-based-con...
Now, if they can come up with a way to selectively turn the ligatures off and on, I'll give it another go. Until then, I'm perfectly happy to see the occasional "<=" or something.
Also, that "www" ligature is the stuff of nightmares. Never, ever, with I use that on my computer.
For example, dash vs endash vs emdash, etc: ‒ – — ―
If those symbols were used in a programming language and had different meanings, differentiating quickly could be much more difficult than seeing the difference between -, --, ---, and so on at a glance.
The very thing amk_ is praising is that this issue is fixed in both Fira and Monoid by the triple-equal being not just longer but represented using 3 horizontal bars rather than just 2.
IMO it's comparable to a WYSIWYG equation editor vs looking at raw LaTeX - conceptual errors pop more.
I guess I'm not alone in this, because in the Fira Code repo there's this commit from 2 months ago: "Remove [] ligature from specimen".
Right now I only have 3 split views, Unit tests, the header and the source file I am working on.That window does not take up the full screen and I have plenty of space for a build VM another text editor for scripts and notes, a file manager and a few consoles.
At the same time, I'm amazed that we, developers of all people, still use mostly software from the 80's. At least conceptually, if not actual code.
I mean, our tools can be as awesome as we want them to be. An illustrator is at the mercy of others to improve his daily software. We're not.
And yet, we get all fired up when we are able to display thousands of colors, some pseudo GUI feature like menus or divisors by patching fonts or have text appear at the opposite end of the line simultaneously. Madness right? I know.
I'm as guilty as the next guy, my editor is Vim (on the terminal) and I spend ridiculous amounts of time tweaking tmux, bash/zsh and fetishizing over color schemes.
I can't help but feel that by now we should have an OpenGL rendered environment where something like SublimeText's minimap would be easy and Hollywood style interfaces possible, albeit excessive.
Ligatures are a time-honored way to improve the look and feel of combinations of characters, that's basically the entire point of them.
Perl 6 tends to support both multicharacter ASCII operators and single-character Unicode equivalents.
I think doing it with the font might actually be nicer from a usability perspective. Unicode is fun to play with but slows me way down.
One of the golang plugin bundles for Atom runs gofmt on every file on save which is actually pretty neat. I've been tempted to do the same for all of the languages I use. It sort of habituates me to do the right thing over time, as I see the changes happen immediately and I'm always working with a file that is mostly in the "right" style.
It's cool that some folks find it better, but it's just not for me
But of the three screen shots offered, it looked like the worst and the www looked really bad.
When coding in Haskell, I used to use the vim-haskellConcealPlus [1] plugin for vim to swap chars being display into nicer unicode chars for various operations.
I'm no longer using it now because it wasn't monospaced and moving around lines was jarring.
If only there's a way to combine the benefits of the two. Monospaced font with ligatures seems to only work for operators that take the same amount of space as their ligature counterpart.
[1]: https://github.com/enomsg/vim-haskellConcealPlusI tried to figure out how to hack open sans to do this, but the tool chain and steps needed to modify a font aren't well documented as far as I can tell.
The code is listed as:
// FIRA CODE
object o;
if (o is int i || (o is string s &&
int.TryParse(s, out i)) { /* use i */ }
var x = 0xABCDEF;
-> --> ==> != === !== && ||<=<
</><tag> http://www.hanselman.com
<=><!-- HTML Comment -->
i++; #### ***
I think what was actually used is: // FIRA CODE
ABCDEFGHIJKLMNOPQRSTUVWXYZ
0123456789!@#$%^&*()_+={}[]<>/?'";:~`
object o;
if (o is int i || (o is string s &&
int.TryParse(s, out i)) { /* use i */ }
var x = 0xAB_DE_F;
-> --> ==> != === !== && ||<=<
</><tag> http://www.hanselman.com
<=><!-- HTML Comment -->
i++; #### ***
The underscores in the hex literal are not part of the font, which looks like it is confusing some people.A couple of those lines are new C# 7 features (patterns and literals) that appear to have been partially lifted from this blog post: https://blogs.msdn.microsoft.com/dotnet/2017/03/09/new-featu...
I wrote a section on C# 7 for a new chapter in the upcoming second edition of my book from last year. There are loads of useful new features in C# 7 (and 6 if you're still on 5) and I thought I recognised those snippets.
(Oblique and italic are both slanted styles of font; the difference is that a true italic has some cursive features and an oblique does not.)
For everyone else, perhaps it should be seen as an editor problem? There's no reason vim can't see that you type != or =/= and replace it on the fly with ≠.
Is there any good terminal app that supports ligatures? I tried konsole, but the font looked like it wasn't getting any anti-aliasing and was harder to read as a result.
I love terminator, but it doesn't support ligatures.
What do you use?
Since it's a bit of a process to rebuild Iosevka, I just bundled the artifacts: https://goo.gl/gsFm8P
(Please excuse the redirection, this got a LOT of downloads and I have a big azure credit so I hosted it there and youw ould not believe what a pain it is to host simple linkable files on Azure).
https://gist.github.com/pcstl/2d9b28a74d6f9254586c2d58d54590...
There are a LOT of problems with that. First and foremost you really do want double character width for these symbols in the iosevka format. Stuff like → is microscopic.
www.triplicatefont.com
Did anyone experience the same in the begging and grew to actually like these fonts or was it always a "love at first sight" experience for you that use them?
Later I loaded up some JS code I was working in earlier but without ligatures as the terminal I was using didn't support them. It definitely felt oddly verbose, especially the arrow functions.
I can still go either way, but it's mostly lack of ligature support that keeps from adopting it wholesale. Changing one way or another is a tad disruptive.
For example, the 'x' in the hex value. Is it a regular 'x' or another character? How about those fat arrows? How are those typed?
My opinion might be biased by a heavy math background, but I like that e.g. "less than or equal" now looks the same as the way I write it on paper, and I don't find myself spending any time thinking about what that symbol means.
I'll concede that it totally messes up command line help text in the console, though. You get lots of stuff like --parameter=<value> turned into —parameter≤value> but it hasn't annoyed me enough to switch back yet.
I think the slight improvement in visual clarity when reading the ligatures makes up for the slight noise when writing them, but it's definitely a personal preference.
The && also breaks out of alignment. Alignment is the whole reason I am using mono-spaced fonts.
My history: IBM VGA (strange j, h, k, etc.), Courier, Bitstream Vera Sans, Lucida Sans Italics (only proportional font, but it looked great at the time), Consolas, Kids Play.