Live data from Hacker News

Memory safety for web fonts

developer.chrome.com

121–130 of 230 posts

Re: Memory safety for web fonts

#121

I've recently been learning about how fonts render based on subpixel layouts in monitor panels. Windows assumes that all panels use RGB layout, and their ClearType software will render fonts with that assumption in mind. Unfortunately, this leads to visible text fringing on new display types, like the alternative stripe pattern used on WOLED monitors, or the triangular pattern used on QD-OLED. Some third-party tools…

[deleted]

Re: Memory safety for web fonts

#122
post #24

Look, a language that was conceived out of necessity to write a web browser in a safer way is being used just for that. It's a different, unrelated browser, but the language still reaches its design goals beautifully.

[deleted]

Re: Memory safety for web fonts

#123

If fresh code in Rust truly reduces the number or severity of CVE in a massively tested and fuzzed C library like this one it will be a major blow to the “carefully written and tested C/C++ is just as safe” perspective. Just need the resources and Rust performance to rewrite them all.

There are no major blows required. The idea that carefully written C/C++ code is just as safe was never tenable in the first place, and obviously so.

Re: Memory safety for web fonts

#124
post #93

Earlier quoted context omitted.

macOS dropped it a few years ago, primarily because there are no Macs with non-HiDPI displays any more (reducing benefit of subpixel AA) and to improve uniformity with iOS apps running on macOS via Catalyst (iOS has never supported subpixel AA, since it doesn’t play nice with frequently adjusted orientations). Windows I believe still uses RGB subpixel AA, because OLED monitor users still need to tweak ClearType setti…

> because there are no Macs with non-HiDPI displays any more That is not true. Apple still sells Macs that don't come with a screen, namely Mac Mini, Mac Studio, and Mac Pro. People use these with non-HiDPI monitors they already own all the time.

Sure, but they’re not going to optimize for that case because the bulk of their Mac sales are tied up in their laptops and a significant chunk (I’d hazard a guess over 50%) of people buying Studios/Pros especially but also Minis are pairing them with Studio Displays, Pro Display XDRs, or more recently the various third-party 2x HiDPI display offerings from the likes of Asus, BenQ, Dell, and Samsung.

Re: Memory safety for web fonts

#125

It's very annoying that Google's websites, including this blog, are automatically translated to my browser's preferred language. Sillicon Valley devs clearly believe that machine translation is a magical technology that completely solved internationalization, like in Star Trek. No, it's far from it. Ever since internet has been flooded with automatically translated garbage, the experience of international users, at l…

I keep setting all my preferences *everywhere* to English, yet 50% of the time google search results are 100% Finnish. With a helpful "change to English" link that does not work.

Worst still Google Maps will insist on only showing street names, area names, an directions in Swedish.

Re: Memory safety for web fonts

#126

This is the true power of Rust that many are missing (like Microsoft with its TypeScript rewrite in Go): a gradual migration towards safety and the capability of being embedded in existing project. You don't have to do the Big Rewrite™, you can simply migrate components one by one instead.

> like Microsoft with its TypeScript rewrite in Go My understanding is that Microsoft chose Go precisely to avoid having to do a full rewrite. Of all the “modern” native/AoT compiled languages (Rust, Swift, Go, Zig) Go has the most straightforward 1:1 mapping in semantics with the original TypeScript/JavaScript, so that a tool-assisted translation of the whole codebase is feasible with bug-for-bug compatibility, and…

As I understood their arguments it was not about the effort needed to rewrite the project.

It was about being able to have two codebases (old and new) that are so structurally similar, that it won't be a big deal to keep updating both

Re: Memory safety for web fonts

#127
post #93

Earlier quoted context omitted.

> because there are no Macs with non-HiDPI displays any more That is not true. Apple still sells Macs that don't come with a screen, namely Mac Mini, Mac Studio, and Mac Pro. People use these with non-HiDPI monitors they already own all the time.

That's not really the most charitable reading of GP's comment. I think they very clearly mean that Apple does not sell Macs with non-HiDPI displays anymore . It's not a configuration they sell, so they don't need to support those features anymore in their current offerings. You're right that there's nothing stopping someone from hooking up an HDMI-to-VGA adapter for their 22" Trinitron from 2001, but that doesn't mea…

> It's not a configuration they sell

So what is the "configuration they sell" for the desktop Macs? The Studio Display that costs way too much for what it is, so to no one's surprise, they're not selling all that many of those? Or the Pro Display XDR for which the stand alone costs more than an entry-level Mac Mini? Sure no one will buy a $1600 monitor to use with their $600 Mac Mini. They'll get a much cheaper third-party 2K one.

Re: Memory safety for web fonts

#128

It's very annoying that Google's websites, including this blog, are automatically translated to my browser's preferred language. Sillicon Valley devs clearly believe that machine translation is a magical technology that completely solved internationalization, like in Star Trek. No, it's far from it. Ever since internet has been flooded with automatically translated garbage, the experience of international users, at l…

It would be nice to have a browser setting that says: Use the original version of the text, if it is written in one of my preferred languages.

Re: Memory safety for web fonts

#129
post #110

Earlier quoted context omitted.

The thing I don't get is that there are plenty of Googlers traveling internationally. They've been aware of the problem for over a decade now, yet it persists. If I'm traveling from Spain to Poland with a browser set to use UK-English, why would the site immediately switch to Polish? It makes no sense that this common corner case isn't addressed at all after all this time. At the very least sites that do this should…

Just imagine the mess in Belgium!

Actually I can imagine that multilingualism would force the devs to rely on Accept-Language instead of GeoIP. Talking out of my arse here :)

Re: Memory safety for web fonts

#130
post #54

Earlier quoted context omitted.

It already is replaced by HarfBuzz https://harfbuzz.github.io

Harfbuzz is designed to run on top of the FreeType Renderer. https://harfbuzz.github.io/what-does-harfbuzz-do.html

I stand corrected, thank you for follow up
Post reply on HN