-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fonts with programming ligatures show weird behavior #514
Comments
I mean, isn't that how ligatures normally work? They can't really tell the difference between |
Well, but maybe there should be some stop-character (by default?) that prevents a ligature in this case |
@puco Is there such a character? If there is, then you could definitely add it to your prompt, with However, that doesn't really seem like it's a solution that'll work for all cases |
I think you can use: https://en.wikipedia.org/wiki/Zero-width_non-joiner |
fonts are free to define any arbitrary ligatures they want, so if you were to try to use a ZWNJ character to defeat the ligatures, then you'd have to insert them between every single character. which would probably then break logic related to graphemes when formed by multiple characters (e.g. separate jamo in korean hangul which should be presented as a single glyph). in css, there is a font-variant-ligatures: none that you can use to disable ligature usage during font rendering. i'd assume that whatever font rendering engine used by the terminal would have a similar knob that could be turned ... |
To be clear, I was suggesting zwnj for the end of prompt by default. It would absolutely be a bad idea to use to remove ligatures everywhere. |
I believe this is something we could work with. I believe @miniksa already has a list of renderer knobs he's thinking about exposing as settings |
This looks as designed to me, trying to do some trickery with ZWJ that only works in Windows Terminal sounds like the wrong direction. If you use ligatures and hit this often you should probably just change your prompt. |
what if we broke ligatures when we were overlaying the COOKED_READ data? That would solve it for CMD specifically ...
…________________________________
From: Daniel Imms <notifications@github.com>
Sent: Wednesday, May 8, 2019 8:15:50 AM
To: microsoft/Terminal
Cc: Subscribed
Subject: Re: [microsoft/Terminal] Fonts with programming ligatures show weird behavior (#514)
This looks as designed to me, trying to do some trickery with ZWJ that only works in Windows Terminal sounds like the wrong direction. If you use ligatures and hit this often you should probably just change your prompt.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTerminal%2Fissues%2F514%23issuecomment-490527963&data=01%7C01%7Cduhowett%40microsoft.com%7C4c6b0c3ae7184187320a08d6d3c80ea7%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=EtTyMXc0%2FgLyhZ1d9oPsKaaDjf0QrrmGKAPJVAhzOkk%3D&reserved=0>, or mute the thread<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADNHLGSNVHPU6T2N3FR6U7DPULVCNANCNFSM4HLJZ6GQ&data=01%7C01%7Cduhowett%40microsoft.com%7C4c6b0c3ae7184187320a08d6d3c80ea7%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=w%2Blge7QO2CmIW%2BUbK8GZ5D2xmNQ7K17BgSbReA7xPsw%3D&reserved=0>.
|
@DHowett-MSFT that's not a terrible idea, but I'm not sure how we could render that without sticking a fake ZWNJ in the buffer, or rendering that ZWNJ via conpty. It's certainly something that could be investigated, but I don't have high hopes it would work easily |
OK. This weird behavior, as is, is by design. I've created two follow-on issues to dig into the different proposals here as they're separate concerns. I'll close this one as is so other complaints can be duped here. |
'Resolutin-By-Design'..... LOL, Design must be .... 👎 |
@Luuk34 This is literally the design of how ligatured fonts work. If you don't like ligatured fonts, then you're free to
but comments like "Design must be .... 👎" aren't really constructive here. |
:edit seeing #757 seems like the disliked comment was actually taken to heart and people are now trying to fix it. How is it not constructive when someone gives you the most valuable information. All that is being asked is an exception in code that states.
And of course a toggle switch because people who know what they are doing don't want permanent decisions made for them. Please don't view negative feedback as unconstructive.| He is probably not talking about the design of the ligature fonts but about the design of how cmder handles them ! I haven't seen this functionality in any other terminal emulator in windows or Linux. But the goal should always be better than the competition by as large a margin as possible. And ofc if your code is so bloated by company standard practices adding anything like this adds huge amount of unnecessary bloat. Don't get me wrong much love to y'all and thx for making this emulator its now my main one. |
When fonts with programming ligatures is used, a weird behavior is show if write some characters at first, for example with FiraCode.
The text was updated successfully, but these errors were encountered: