News for hackers. Stuff that matters.
Re:Sublime Text 3 now has font ligature support by skytreader on Friday October 06, 2017 @12:11AM (#15414362)
Honest question: Why would you want ligatures in plaintext? Especially in code, wouldn't that be weird as some people tend to manually align their code? Like,

  modular_raft = 10
  spam         = 20
The "ft" in modular_raft should convert to a ligature so (I assume) it will then take one character, instead of two. Then developers viewing that source would have different alignments, depending on whether they use Sublime 3 or not.

(EDIT: Formatting.)

Re:Sublime Text 3 now has font ligature support by apendleton on Friday October 06, 2017 @12:30AM (#15414436)
Besides fancy programming fonts (which I have mixed feelings about), ligatures and other complex text shaping features can also be necessary for legibly rendering string literals in some non-Latin scripts, like Arabic script. Even if your code is all in Latin letters, you might have test data, UI text, etc., that's in something else.
Re:Sublime Text 3 now has font ligature support by wcarss on Friday October 06, 2017 @01:02AM (#15414546)
Thank you for providing this insight -- I'm one of the seemingly rare few who hates ligatures in my Latin-script fonts, and when I saw this submission my brain leapt to "augh, why!?" -- you've given at least one very clear use-case where ligature support is valuable, which I was totally unaware of.
Re:Sublime Text 3 now has font ligature support by trumpeta on Friday October 06, 2017 @04:16AM (#15415195)
The cool thing about ligatures is that they are a property of the font, not of the text, so I can have a font with ligatures and you can have one without.
Re:Sublime Text 3 now has font ligature support by drivingmenuts on Friday October 06, 2017 @08:37AM (#15416299)
I've been using Fira Code for a while and having ligatures does make code a bit easier for me to read. I certainly could live without the feature, but if it's there, I'm going to turn it on.

Which, ultimately, is what matters. You actually have to turn it on in Jetbrain's editors.

It's a decent "no harm, no foul" feature.

Re:Sublime Text 3 now has font ligature support by computerex on Friday October 06, 2017 @08:47AM (#15416360)
I tried to get ligatures to work in gvim for so long because Fira Code looks wonderful with ligatures. Could not make it work :(
Re:Sublime Text 3 now has font ligature support by inferiorhuman on Friday October 06, 2017 @04:47AM (#15415323)
This was the most recent blurb on HN I've seen about fonts with ligatures for coding:

https://news.ycombinator.com/item?id=14821446

I've mixed feelings about the idea, but generally seem to like the combination of Atom and Fira Code.

Re:Sublime Text 3 now has font ligature support by amelius on Friday October 06, 2017 @03:06AM (#15414955)
Perhaps the editor should include a method to turn this kind of options on/off with special sequences e.g. in comments.
Re:Sublime Text 3 now has font ligature support by usrusr on Friday October 06, 2017 @03:57AM (#15415117)
That, or just don't apply ligatures to basic Latin characters. I suppose that people who like using international characters for their identifiers would not mind having ligatures applied to them. Solved by font selection.
Re:Sublime Text 3 now has font ligature support by hasenj on Friday October 06, 2017 @03:01AM (#15414943)
Are you saying this version of SL supports rendering Arabic with proper shaping?
Re:Sublime Text 3 now has font ligature support by PeCaN on Friday October 06, 2017 @03:11AM (#15414971)
Since it now uses DirectWrite, it should support Arabic well, at least on Windows. DirectWrite handles shaping for a bunch of scripts.
Re:Sublime Text 3 now has font ligature support by __float on Friday October 06, 2017 @12:15AM (#15414379)
Some people use monospace fonts with ligatures specific to common programming languages: https://github.com/tonsky/FiraCode is one such example.
Re:Sublime Text 3 now has font ligature support by skytreader on Friday October 06, 2017 @12:21AM (#15414397)
Nice example, thank you. I see how they managed to avoid my issues.

(To save people the click: LaTeX ligatures != Fira ligatures. Most Fira ligatures are for programming operators/comparators and they are made to take as much space as the non-ligature version.)

Re:Sublime Text 3 now has font ligature support by Shorel on Friday October 06, 2017 @05:24PM (#15420582)
Both of these ligatures (fi and ->) in standard computer fonts like TTF or OTF use exactly the same technology.

The only difference is that one ligature applies to alphabetic characters and the other to non-alphabetic characters.

Ligatures can be used to make some font aesthetically pleasing like this: http://www.impallari.com/lobster/

Or they can be abused like this: https://pixelambacht.nl/2015/sans-bullshit-sans/

It is perfectly possible for a font to have alphabetic and non-alphabetic ligatures.

Re:Sublime Text 3 now has font ligature support by Recurecur on Friday October 06, 2017 @09:21AM (#15416552)
I've been using FiraCode in Idea with ligatures, and like it.

It's not a "must have", but I find it more readable and pleasing than using regular fonts.

Re:Sublime Text 3 now has font ligature support by dahart on Friday October 06, 2017 @12:29AM (#15414434)
The monospace font ligatures turn 2 characters into a double-wide single character, so you can still align to your heart's content! https://www.hanselman.com/blog/MonospacedProgrammingFontsWit...
Re:Sublime Text 3 now has font ligature support by matthewvincent on Friday October 06, 2017 @12:44AM (#15414478)
I can only speak for me as someone who really loves the aesthetics of code, but there's something super enjoyable about things like arrow functions rendering as actual arrows in Java / JavaScript. It's so clean!
Re:Sublime Text 3 now has font ligature support by kpil on Friday October 06, 2017 @01:58AM (#15414741)
Yeah, only that it does that without any context.

Ligature mishaps are doubleplus-unclean.

Re:Sublime Text 3 now has font ligature support by Shorel on Friday October 06, 2017 @07:13AM (#15415833)
Not all ligatures work for all syntax files. Therefore the syntax file has something to do with ligatures, therefore it has context.
Re:Sublime Text 3 now has font ligature support by mrighele on Friday October 06, 2017 @09:14AM (#15416500)
I agree, for this reason I don't think it is right to do on a font level. I prefer to use my editor's (emacs) capability to do visual substitutions depending on language that I am using.
Re:Sublime Text 3 now has font ligature support by pjtr on Friday October 06, 2017 @01:44AM (#15414680)
This reminds me of elastic tabstops. https://en.wikipedia.org/wiki/Tab_stop#Elastic_tabstops

Does Sublime Text support those? Any other popular editor? If not, why?

Re:Sublime Text 3 now has font ligature support by etatoby on Friday October 06, 2017 @04:39AM (#15415302)
No decent editor or IDE supports "proper" elastic tabstops, except for a Visual Studio plugin, I believe.

The problem is that it needs the underlying text editor to support different non-uniform tab stops to be configured for every line of code. Few if any text editors support it.

Re:Sublime Text 3 now has font ligature support by coldtea on Friday October 06, 2017 @07:37AM (#15415950)
>The "ft" in modular_raft should convert to a ligature so (I assume) it will then take one character, instead of two

It's not about those kind of ligatures -- but about special programming fonts with programming-oriented ligatures (think >= etc).

Those still can affect code alignment, but there are people who are against manual alignment anyway.

Re:Sublime Text 3 now has font ligature support by pvg on Friday October 06, 2017 @12:17AM (#15414385)
It doesn't affect formatting spacing and is mostly for special symbols like arrows, greater than equal, double and triple equalities, etc. The ligatures in question are for programming languages, not stuff like 'ft'.
Re:Sublime Text 3 now has font ligature support by giancarlostoro on Friday October 06, 2017 @05:24AM (#15415460)
This is my understanding of it as well. The purpose is to DISPLAY two characters as one more clearer to view character, but on GitHub and other places it will still be two independent characters. The purpose is clarity whilst viewing code.
Re:Sublime Text 3 now has font ligature support by ygra on Friday October 06, 2017 @01:43AM (#15414673)
Even if monospaced fonts have that ligature, I'm sure they make it as wide as two characters, as the ligature is simply a single glyph representing two characters.
Re:Sublime Text 3 now has font ligature support by imron on Friday October 06, 2017 @02:04AM (#15414757)
> it will then take one character, instead of two

No it will still take two characters, but they will be represented by a single glyph.

Re:Sublime Text 3 now has font ligature support by TheRealPomax on Friday October 06, 2017 @10:17AM (#15416943)
Just because it's "plain text" doesn't mean it has to be monospaced. There are too many other things you can write that aren't "code" for which a good text editor is infinitely preferable to a clunky dedicated GUI application.