News for hackers. Stuff that matters.
Re:It takes a PhD to develop that by maficious on Monday October 04, 2021 @07:01AM (#28745196)
The font, m8, the font. Use monospcae font and it works like a charm.
Re:It takes a PhD to develop that by mwcampbell on Monday October 04, 2021 @07:06AM (#28745218)
Does the GP's chosen font work correctly in Windows Terminal, though? If so, then that proves that there is indeed more to a fully functional terminal renderer than refterm covers.
Re:It takes a PhD to develop that by maficious on Monday October 04, 2021 @07:14AM (#28745267)
Refterm is a not a full-featured terminal in terms of configurability, but it has all the features needed for rendering. Configuration like: choosing fonts, choosing colors, tabs, whatever, it's misc. features, which are unrelated to rendering. The case here is about rendering and it's exactly what is shite in every terminal emulator. I don't understand why everyone is arguing about it anyway. Refterm provides a fix, Windows Terminal should simply implement it. Is this dignity or what? Are you not engineers? Should you not prioritise software quality above everything else?

EDIT: Remove argument about ease of development, because refterm is easy.

This bugs me every time. "Wow, this software works so good, but we are not gonna make our software like that, no, we'll stick to our shite implementation."

Re:It takes a PhD to develop that by makomk on Monday October 04, 2021 @07:50AM (#28745507)
The fact that Casey Muratori's proposed approach requires the terminal to reimplement the process of correctly mapping characters to glyphs - including stuff like fallbacks to other fonts - is a huge part of the argument for why it's much harder to implement and more complicated than he claims. If it really doesn't do that right for something as simple as a decimal seperator for the font some random HN commenter happened to use, that does tend to suggest the Microsoft employees are in the right here.
Re:It takes a PhD to develop that by maficious on Monday October 04, 2021 @08:04AM (#28745608)
The "font some random HN commenter happened to use" is some f****** proportional Calibri. I want to see someone use it in any terminal emulator. Refterm defaults to Cascadia Code, but, fair enough, it doesn't have fallback yet.

Its' description says also: "Reference monospace terminal renderer". "monospace" is there for a reason.

It's worth mentioning though, that Windows Terminal also defaults to Cascadia Code and Cascadia Code was installed automatically on my machine, so it's de-facto the new monospace standard font on Windows starting from 10.

Re:It takes a PhD to develop that by avereveard on Monday October 04, 2021 @08:38AM (#28745866)
> some f*** proportional Calibri Refterm defaults to Cascadia Code

cascadia is as borken as the other font, so what now?

https://i.imgur.com/WeV8Ror.png

maybe writing a unicode rendering isn't that easy? maybe drop the attitude?

Re:It takes a PhD to develop that by maficious on Monday October 04, 2021 @09:07AM (#28746187)
>maybe drop the attitude?

You came here with an attitude.

> I just launched "dir" https://i.imgur.com/lkbOR3i.png can't even print properly the decimal separator. maybe it wasn't that easy.

Re:It takes a PhD to develop that by maficious on Monday October 04, 2021 @08:49AM (#28745984)
Turned out it defaults to Cascadia Mono, my bad. Still your argument is wrong, because, like it doesn't work on your machine, on mine it does.
Re:It takes a PhD to develop that by avereveard on Monday October 04, 2021 @10:47AM (#28747425)
which is exactly the point, the amount of shortcut taken to convert code point to fast graphics make it just a nice hack thrown together and devs were right on preferring the slow but correct approach.
Re:It takes a PhD to develop that by Jensson on Monday October 04, 2021 @11:29AM (#28747966)
That is a terminal bug and not a rendering bug though, since the problem was that the terminal didn't properly fetch your user settings here. Feeding the same character into the other rendering would cause the same issue.

Nobody said he made a fully functional better terminal, just that the terminal rendering was better and functional. Doing everything needed for a fully functional terminal is a lot of work, but doing everything needed for terminal rendering isn't all that much work.

Re:It takes a PhD to develop that by avereveard on Monday October 04, 2021 @12:09PM (#28748691)
> Nobody said he made a fully functional better terminal

> The "complaining developer" produced a proof of concept in just two weekends that notably had more features[1] and was more correct than the Windows Terminal!

easily falsifiable bullshit found to be false.

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

Re:It takes a PhD to develop that by maficious on Tuesday October 05, 2021 @04:15AM (#28756677)
I have to say though, the responder to the first comment did a bad job at conveying what exactly refterm is... Apparently people falsely think that refterm is a terminal emulator and use it interchangeably with terminal and terminal renderer, while it isn't.

If you were to open refterm once, you'd see a text that explicitly states "DO NOT USE IT AS A TERMNIAL EMULATOR", or something like that (can't open it now to copy exact).

Re:It takes a PhD to develop that by withinboredom on Monday October 04, 2021 @08:13AM (#28745669)
You can’t use a non-monospace font on a tiled space. Like that literally makes no sense. Of course it won’t look right. This is like asking why you can’t use `out` parameters on an inherent async function.
Re:It takes a PhD to develop that by makomk on Monday October 04, 2021 @09:44AM (#28746604)
Whether the font is monospace or not isn't really the problem - that causes some aesthetically ugly spacing, but that's to be expected and it's still readable. The big issue is that the code has completely failed to find a glyph for one of the characters used in something as commonplace as a directory listing from the dir command and people expect better than this from font rendering in modern applications.
Re:It takes a PhD to develop that by withinboredom on Monday October 04, 2021 @11:15AM (#28747777)
If you copy and paste, the characters are there. The problem is that the glyph simply is off the tile.
Re:It takes a PhD to develop that by maficious on Monday October 04, 2021 @08:28AM (#28745787)
Then again, refterm doesn't f*ck it up. It still renders proportional font; just aligned to tiles. It is essentially doing the same as for emoji.
Re:It takes a PhD to develop that by Aeolun on Monday October 04, 2021 @07:13AM (#28745260)
As far as I understood from the video about refterm the speedup is mostly due to not rendering literally every frame in sequence (after all, who needs that), which is what windows terminal seems to be doing.

That seems like it would be unaffected by correcting font rendering.

Re:It takes a PhD to develop that by maficious on Monday October 04, 2021 @07:42AM (#28745448)
> That seems like it would be unaffected by correcting font rendering.

It is.

"... extremely slow Unicode parsing with Uniscribe and extremely slow glyph generation with DirectWrite..."

Glyph generation is about rasterising text, because you can't just feed it the font file.

Re:It takes a PhD to develop that by vermilingua on Monday October 04, 2021 @07:50AM (#28745512)
This is some schoolyard level stuff right here. The GP isn't using a monospaced font. Who, in the history of terminal emulators, has wanted to use a non-monospaced font in their terminal?
Re:It takes a PhD to develop that by onion2k on Monday October 04, 2021 @07:54AM (#28745543)
This is exactly the sort of "we can just skip that feature to make it faster!" edge case that I was talking about in my post.
Re:It takes a PhD to develop that by vermilingua on Monday October 04, 2021 @08:02AM (#28745591)
But it isn't an edge case! It's not an edge case, if it isn't a use case!

This is an edge case as much as building a rasterizer directly into the terminal is an "edge case".

Re:It takes a PhD to develop that by l30n4da5 on Monday October 04, 2021 @02:51PM (#28750655)
> But it isn't an edge case! It's not an edge case, if it isn't a use case!

The fact that a random commenter on HN used a non-monospaced font with refterm actually makes it a use case.

I do, however, agree that it is an edge case with a very low probability.

Re:It takes a PhD to develop that by fouric on Tuesday October 05, 2021 @03:38PM (#28764531)
Because it's such an improbable edge case, it seems like it's not relevant to the more general discussion of "does refterm's speed and features actually show that the rendering problem is far easier than the Microsoft developers made it out to be".

The Microsoft terminal doesn't render monospaced fonts, the overwhelmingly common case, nearly as fast as refterm. If rendering variable-width fonts is somehow intrinsically insanely expensive for some reason (which I haven't seen anyone provide good evidence for), then a good implementation would still just take refterm's fast monospaced rendering implementation and use it for monospaced fonts, and a slower implementation for variable-width fonts.

That is - refterm's non-existent variable-width font rendering capabilities do not excuse the Windows terminal's abysmal fixed-width font rendering capabilities.

Re:It takes a PhD to develop that by l30n4da5 on Thursday October 07, 2021 @11:43AM (#28787793)
Agreed. It doesn't seem like it is relevant. My comment was more addressing that it _is_ an edge-case, albeit a very unlikely one.
Re:It takes a PhD to develop that by 9935c101ab17a66 on Monday October 04, 2021 @09:10AM (#28746213)
Wait, what? Your edge case is something that no one would ever (should ever?) do? Are you going to complain about it not rendering scripts fonts correctly either?

Also, it's worth noting that this isn't a compelling argument in the first place because the windows terminal doesn't even come close to rendering readable Arabic, it fucks up emoji rendering, etc – all cases that Casey was able to basically solve after two weekends of working on this.

Re:It takes a PhD to develop that by onion2k on Monday October 04, 2021 @10:52AM (#28747482)
In my 25 years of software development I've found that I'm rarely able to enumerate what an application should or shouldn't do on my own. Unless the app is extremely simple and has very few options it's incredibly unusual for any individual to understand everything about it. While I don't have a use case where I'd want to use a variable space font in a terminal, that doesn't mean such a case doesn't exist for anyone. Maybe some people want that feature.

Windows Terminal, for some reason, gives users the option to change their font to one that isn't monospaced, so I'd argue that it should render them correctly if the user chooses to do that.

Re:It takes a PhD to develop that by maficious on Monday October 04, 2021 @08:11AM (#28745659)
Would you actually...?
Re:It takes a PhD to develop that by avereveard on Monday October 04, 2021 @08:30AM (#28745805)
Re:It takes a PhD to develop that by avereveard on Monday October 04, 2021 @08:30AM (#28745804)
doesn't work even with the proper font https://i.imgur.com/WeV8Ror.png
Re:It takes a PhD to develop that by jiggawatts on Monday October 04, 2021 @09:01AM (#28746106)
You're not arguing in good faith.

Casey threw something together in a matter of days that had 150% of the features of the Windows Terminal renderer, but none of the bug fixing that goes into shipping a production piece of software.

That screenshot you keep parading around is a small issue with a quick fix. It's not like Casey's approach is inherently unable to deal with punctuation!

You don't discard the entire content of a scientific journal paper because of a typo.

"Sorry Mr Darwin, I'm sure you believe that your theory is very interesting, but you see here on page 34? You wrote 'punctuted'. I think you meant 'punctuated'. Submission rejected!"

Re:It takes a PhD to develop that by makomk on Monday October 04, 2021 @09:59AM (#28746780)
In this case, the bug fixing is probably the lion's share of the work though - there's a huge amount of subtle edge cases involved in rendering text, and the Microsoft employees almost certainly know this. And the example that broke it isn't even something particularly obscure. We're literally talking about the output of the dir command, one of the first things someone is likely to do with a terminal window, not displaying correctly. He basically did the easy part of the work and lambasted some Microsoft employees as idiots because they thought it was more complex than that.
Re:It takes a PhD to develop that by mwcampbell on Monday October 04, 2021 @10:17AM (#28747032)
In Casey's defense (I'm ambivalent on this one), while the dir command itself isn't obscure, one could argue that using a no-op Unicode character as the digit group separator is an obscure case, at least for an American programmer. But I think your overall point still stands.
Re:It takes a PhD to develop that by avereveard on Monday October 04, 2021 @10:52AM (#28747491)
You've lost the original point: everyone was pretending this refterm was ready to replace the terminal app, criticizing microsoft for taking the slow but sure approach:

> The "complaining developer" produced a proof of concept in just two weekends that notably had more features[1] and was more correct than the Windows Terminal!

But now apparently pointing out that "MS was right not to want to take shortcut in unicode rendering" morphed into "criticizing in bad faith refterm for not being production ready"

Who's not arguing in good faith here?

Re:It takes a PhD to develop that by xatnys on Monday October 04, 2021 @11:52AM (#28748321)
>refterm was ready to replace the terminal app

Considering Casey himself puts front and center the disclaimer that this is solely intended to be a reference and goes into as much detail in his videos I don't know where you got this from. I don't think anyone is under the illusion that this is could replace the actual terminal. It's just meant to show that there's a minimum level of performance to be expected for not a huge amount of effort (a couple weekend's worth) and there is no excuse for less.

Re:It takes a PhD to develop that by Jensson on Monday October 04, 2021 @11:42AM (#28748130)
> everyone was pretending this refterm was ready to replace the terminal app

Who said that? Refterm isn't a fully functional terminal, it is just a terminal renderer bundled with a toy terminal.

Re:It takes a PhD to develop that by avereveard on Monday October 04, 2021 @08:05AM (#28745609)
I haven't changed anything, just downloaded and launched, that's the result. if the term only works with one font why is the software picking a random one from the system conf?
Re:It takes a PhD to develop that by mwcampbell on Monday October 04, 2021 @08:22AM (#28745736)
It looks like refterm is hard-coded to use Cascadia Mono, which isn't included in-box with Windows 10. So I don't know what happens if you don't have that font. If that's the only issue, then I think we can let that one go, as refterm is clearly only a proof of concept, and one-time logic for choosing the correct font at startup would presumably have no effect on rendering speed.
Re:It takes a PhD to develop that by avereveard on Monday October 04, 2021 @08:30AM (#28745800)
https://i.imgur.com/WeV8Ror.png

no, doesn't work with cascadia either.

so what now?

Re:It takes a PhD to develop that by mwcampbell on Monday October 04, 2021 @08:38AM (#28745864)
I suspect an i18n issue. What locale are you using, and what is the decimal separator character supposed to be in your locale?
Re:It takes a PhD to develop that by avereveard on Monday October 04, 2021 @08:45AM (#28745935)
Re:It takes a PhD to develop that by mwcampbell on Monday October 04, 2021 @08:57AM (#28746069)
It looks like your "Digit grouping symbol" field is empty. I'm sure that's standard in some locales, though not for US English. I don't know how to make that field empty; when I try, Windows says it's invalid. So I wonder if your locale sets that separator to some kind of Unicode character that, in a proper renderer, is equivalent to no character at all. If that's the case, then I'm guessing refterm could handle that character as easily as it handles VT escape codes. But this does lend some weight to the position that Casey was oversimplifying things a bit.
Re:It takes a PhD to develop that by maficious on Monday October 04, 2021 @09:16AM (#28746275)
well, whatever is different in your settings, mine renders normal https://imgur.com/dGI5W2S

EDIT: I am sorry for the attitude, changed "wrong" to "different"

Re:It takes a PhD to develop that by mwcampbell on Monday October 04, 2021 @09:32AM (#28746487)
Their settings aren't wrong, just different, likely because of differing standards for digit grouping across locales. So this is a case that refterm clearly doesn't support. This case by itself doesn't invalidate refterm's approach to rendering, but I can see why the team at Microsoft, knowing that there are many such cases, would favor abstraction over the absolute best possible speed.
Re:It takes a PhD to develop that by avereveard on Monday October 04, 2021 @10:46AM (#28747412)
which is exactly the point.