Community
Participate
Working Groups
Created attachment 225895 [details] Screenshot snippet showing missing fi ligature I am using a proportionally spaced font (Skolar PE, though other fonts are also affected) for editing my Java and Scala code. The font is designed to use OpenType ligatures for certain character pairs (e.g. ‘fi’), but the Eclipse text editor doesn’t use these and renders such pairs using the glyphs for the individual letters. This looks ugly, and is a distraction when editing code. The editor should therefore use common OpenType ligatures when they are available in a font, or at least there should be an option to use them. It looks like this problem was at least partially caused by an inappropriate fix for Bug 28831. There should at least be an option to use ligatures for fonts containing them, and the editor should work correctly when they are displayed.
In lieu with the title of this bug, I'm hijacking it. There's a new font on the block (has been for a while): https://github.com/tonsky/FiraCode All the Ligatures are rendered correctly, however, the ligatures are all treated as 1-wide instead of their actual width. This makes this font look ugly with 2-character ligatures and impossible to use with 3-character ligatures (<<<). When moving the caret, it will assume positions which are 1/2 or 1/3 and 2/3 into a character.
Ligatures are necessary to support this great coding font: https://github.com/tonsky/FiraCode
(In reply to Mark Jeronimus from comment #1) >When moving the caret, it will assume positions which are 1/2 or 1/3 and 2/3 into a character. Isn't that what one would expect? (In reply to Thomas Baldauf from comment #2) > Ligatures are necessary to support this great coding font: > https://github.com/tonsky/FiraCode I just tested FiraCode on Neon.2 (macOS) and it looks pretty good. Although there is a problem with some line heights being off.
Created attachment 266420 [details] Screenshot showing ligatures on macOS/Neon.2
FWIW: I've been using Iosevka as my preferred ligature font in Eclipse (on macOS) for quite a while, and it works just fine. I guess it depends on the font. I have not tried any others recently.
(In reply to Torkild Resheim from comment #3) > (In reply to Mark Jeronimus from comment #1) > >When moving the caret, it will assume positions which are 1/2 or 1/3 and 2/3 into a character. > Isn't that what one would expect? It's certainly not what I expected - e.g. in https://imgur.com/a/RqWlgXL I would expect 5 characters "a", space, "->" ligature, space, "b". Stopping in the middle of the character is unexpected behaviour for me.
Having the caret stopping between the ligature character is exactly the expected behavior to me. It's also the same behavior in IntelliJ IDEA and Notepad++. It allows you deleting any single character from the ligature without touching the others. While it can be possible to achieve that using delete and backspace for 2-character ligatures, besides the hassle, you can't work around it for ligatures with more than 2 characters.
(In reply to Peter Lupo from comment #7) > Having the caret stopping between the ligature character is exactly the > expected behavior to me. It's also the same behavior in IntelliJ IDEA and > Notepad++. It allows you deleting any single character from the ligature > without touching the others. While it can be possible to achieve that using > delete and backspace for 2-character ligatures, besides the hassle, you > can't work around it for ligatures with more than 2 characters. Thanks for doing the explanation Peter! I just tested jusing Fira Code and there is still something seriously wrong with the height of some lines in the code I’ve looked at, as a result the line numbers column is totally off. Otherwise it renders just fine.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=536562#c92 the lasted SWT can solve this problem via scriptControl.fMergeNeutralItems = true.
(In reply to sunx well from comment #9) > See https://bugs.eclipse.org/bugs/show_bug.cgi?id=536562#c92 > > the lasted SWT can solve this problem via scriptControl.fMergeNeutralItems = > true. Please share a gerrit patch based on your proposal, Thanks!
Sorry, I don't know how to use gerrit.
(In reply to sunx well from comment #11) > Sorry, I don't know how to use gerrit. https://wiki.eclipse.org/Platform/How_to_Contribute Don't hesitate to ask when you need assistance.
Created attachment 281800 [details] Font ligatures on Windows
On Windows, some ligatures works but others don't (see my previous attachment).
On Linux it is not possible to select Fira Code font in Preferences > General/Appearance/Colors and Fonts > Basic/Text Font > [Edit...]. The Fira Code font is not available in the list. As I am writing this, I also have PHPStorm open with Fira Code displaying beautifully in the editor, so no, the font is NOT missing on my system. (By the way, the font picker dialog that Eclipse uses looks Gnome-ish even though I am on KDE)
(In reply to Thiago Berne from comment #13) > Created attachment 281800 [details] > Font ligatures on Windows (In reply to Thiago Berne from comment #14) > On Windows, some ligatures works but others don't (see my previous > attachment). I confirm above behavior on Windows10 as tested with "FiraCode" font as taken from https://github.com/tonsky/FiraCode/tree/master/distr/ttf. Currently investigating a fix for Ligatures support on Windows based on suggestion in: https://bugs.eclipse.org/bugs/show_bug.cgi?id=536562#c92
Raised bug 562165 to investigate the Ligatures support on Windows.
Please check if 3.1 fixes the issue with Fira Code not be detected as monospace https://github.com/tonsky/FiraCode/releases/tag/3.1
(In reply to Torkild Resheim from comment #8) > (In reply to Peter Lupo from comment #7) > > Having the caret stopping between the ligature character is exactly the > > expected behavior to me. It's also the same behavior in IntelliJ IDEA and > > Notepad++. It allows you deleting any single character from the ligature > > without touching the others. While it can be possible to achieve that using > > delete and backspace for 2-character ligatures, besides the hassle, you > > can't work around it for ligatures with more than 2 characters. > Thanks for doing the explanation Peter! > > I just tested jusing Fira Code and there is still something seriously wrong > with the height of some lines in the code I’ve looked at, as a result the > line numbers column is totally off. Otherwise it renders just fine. Is this still an issue on Mac? I tested Eclipse 4.15 with Fira Code on macOS 10.15 and didn't see any problem with line numbers column.
(In reply to Lakshmi Shanmugam from comment #19) > (In reply to Torkild Resheim from comment #8) > > (In reply to Peter Lupo from comment #7) > > > Having the caret stopping between the ligature character is exactly the > > > expected behavior to me. It's also the same behavior in IntelliJ IDEA and > > > Notepad++. It allows you deleting any single character from the ligature > > > without touching the others. While it can be possible to achieve that using > > > delete and backspace for 2-character ligatures, besides the hassle, you > > > can't work around it for ligatures with more than 2 characters. > > Thanks for doing the explanation Peter! > > > > I just tested jusing Fira Code and there is still something seriously wrong > > with the height of some lines in the code I’ve looked at, as a result the > > line numbers column is totally off. Otherwise it renders just fine. > > Is this still an issue on Mac? > I tested Eclipse 4.15 with Fira Code on macOS 10.15 and didn't see any > problem with line numbers column. Nope. Just tested with 4.15 too and and it looks good. I also tested with 4.9 and that also looks good. Which makes me wonder whether this particular bug was in Fira Code. I'm pretty sure I updated it not long ago, but since I normally use Iosevka I did not notice.
As of 2020-03 (4.15.0) on macOS 10.15.4, Ligatures work with Fira Code, but not with Pragmata Pro. Is there any way to fix this?
(In reply to Nikita Prokopov from comment #18) > Please check if 3.1 fixes the issue with Fira Code not be detected as > monospace https://github.com/tonsky/FiraCode/releases/tag/3.1 It turns out I didn't actually have Fira Code installed systemwide. PHPStorm had it just for itself, via a theming plugin. I installed otf-fira-code from Arch linux repository and it works like charm.
(In reply to Jannis Schnitzer from comment #21) > As of 2020-03 (4.15.0) on macOS 10.15.4, Ligatures work with Fira Code, but > not with Pragmata Pro. Is there any way to fix this? Just learned about Pragmata Pro and I can't resist: gosh is that a throwback to coding on Atari Falcon :D Not sure I would use it as a coding font now, but it sure as hell looks classy!
(In reply to Niraj Modi from comment #17) > Raised bug 562165 to investigate the Ligatures support on Windows. Added Ligatures support on Windows via bug 562165 fix.
(In reply to Niraj Modi from comment #24) > (In reply to Niraj Modi from comment #17) > > Raised bug 562165 to investigate the Ligatures support on Windows. > > Added Ligatures support on Windows via bug 562165 fix. Ligatures support is available on Windows with this week & on-wards Eclipse IBuilds: https://download.eclipse.org/eclipse/downloads/drops4/I20200510-1800/
Resolving top level bug, as Ligatures support is now available on all 3 platforms. If there are any issues noticed, please open new bugs.
(In reply to Niraj Modi from comment #26) > Resolving top level bug, as Ligatures support is now available on all 3 > platforms. If there are any issues noticed, please open new bugs. Given that a lot of this discussion was driven by Fira Code, I believe that one action is missing here: submitting a pull request removing the shameful mention of Eclipse as "doesn't work" on the font's Readme (https://github.com/tonsky/FiraCode). :)
(In reply to Pierre-Yves B. from comment #27) > (In reply to Niraj Modi from comment #26) > > Resolving top level bug, as Ligatures support is now available on all 3 > > platforms. If there are any issues noticed, please open new bugs. > > Given that a lot of this discussion was driven by Fira Code, I believe that > one action is missing here: submitting a pull request removing the shameful > mention of Eclipse as "doesn't work" on the font's Readme > (https://github.com/tonsky/FiraCode). :) Agreed!! But just after the 4.16 is released!
(In reply to Pierre-Yves B. from comment #27) > Given that a lot of this discussion was driven by Fira Code, I believe that > one action is missing here: submitting a pull request removing the shameful > mention of Eclipse as "doesn't work" on the font's Readme > (https://github.com/tonsky/FiraCode). :) Appreciate if someone creates a pull request for removing the mention of Eclipse. Thanks!
(In reply to Niraj Modi from comment #29) > (In reply to Pierre-Yves B. from comment #27) > > Given that a lot of this discussion was driven by Fira Code, I believe that > > one action is missing here: submitting a pull request removing the shameful > > mention of Eclipse as "doesn't work" on the font's Readme > > (https://github.com/tonsky/FiraCode). :) > > Appreciate if someone creates a pull request for removing the mention of > Eclipse. > Thanks! I was going to pick this up, but it was already done: https://github.com/tonsky/FiraCode/commit/6fc75b41f9a296721d14cfe6d47d300f1f03dc8c :)