Live data from Hacker News

Google Docs will now use canvas based rendering

workspaceupdates.googleblog.com

401–410 of 953 posts

Re: Google Docs will now use canvas based rendering

#401

Earlier quoted context omitted.

It`s not slow on an old intel i3 laptop and on a motorola one phone. I keep seeing these comments about flutter web with different examples, they are never slow on my old devices. Also you can make the text selectable if you want to.

As a user or as a developer?

Developer. Texts aren't selectable on mobile by default and they want the web version to act the same.

Re: Google Docs will now use canvas based rendering

#402
post #189

Earlier quoted context omitted.

Yet another reason to use Pi-hole. The web browser is the wrong place to try and fight against this sort of thing. Secure your home network once instead of fighting an arms race on each device you have.

How does it help here? They can trivially include ads server-side, pi-hole would see nothing at all.

It would be easy to implement server-side rendering, but it carries significant cost in processing time and networking. If they can block all adblocking browser extensions by abusing WASM, the cost of server-side rendering will outweigh the 0.0001% of people that have a pihole set up.

Re: Google Docs will now use canvas based rendering

#405
post #99

Ever since WebAssembly was first introduced, I thought it was obvious[1][2] that the end game for those that want to control the web is sending opaque binary blobs of code that only use the browser for the canvas tag's framebuffer. Font rendering and layout can all easily be accomplished by embedding libraries like freetype. This breaks all forms of user control - like ad blockers - and turns the web back into cable…

Just for what it’s worth, “word processors” are a logical starting point specifically because the APIs for text manipulation in the DOM are abysmal, and every in-browser WYSIWYG text editor is a steaming pile of hacks. Some of them work well despite this, but, it’s a horrible set of code to maintain and very, very hard to make a good user experience. One of the very hardest things to do well in the browser, actually.…

> The APIs for text manipulation in the DOM are abysmal

I develop an NLP labelling interface (which is similarly document-focused) in JS all day and can attest to this.

Here's some specific examples:

- To work out where some text is being being laid out, eg to display some UI around it, the Selection/Range/Rect APIs will help but Rects are always viewport-relative, so you'll need to convert them to element-relative to position your UI, which sucks.

- Firefox supports multiple DOM Ranges per Selection (ie allows non continguous text selection), but nearly all other browsers support a single range.

- You can't truncate text across multiple lines (the CSS line clamp spec is an experimental fix)

- If you want to pop up an interface while some text is selected, you'll need to capture and reimplement selection because as soon as another item is focused the selection will no longer display.

If you're into JS and building anything document related, I've written a bunch about the some of the issues at https://humanloop.com/blog/how-to-build-an-ml-labelling-inte...

Re: Google Docs will now use canvas based rendering

#406
post #99

Ever since WebAssembly was first introduced, I thought it was obvious[1][2] that the end game for those that want to control the web is sending opaque binary blobs of code that only use the browser for the canvas tag's framebuffer. Font rendering and layout can all easily be accomplished by embedding libraries like freetype. This breaks all forms of user control - like ad blockers - and turns the web back into cable…

This is what Flutter on the web is, by the way. You can try it out here: https://gallery.flutter.dev/#/ and marvel at the impossible to select text, one of the many affordances violently excised here. If it wasn't still incredibly slow even on a cutting-edge Zen3, Nvidia 3070 system they might almost be on to something here.

The demo doesn't have it, but they did fix the selectable text issue, just need to wrap your text in a SelectableText widget.

Re: Google Docs will now use canvas based rendering

#407
post #257

Earlier quoted context omitted.

A dystopia. You can't control-F in the page. Can't copy and paste a word you don't know into a translator or dictionary. Can't share text unofficially - like copy a sentence into a email, etc.

The copy and paste problem is sidestepped in android by the os native ocr, it might become common elsewhere too.

I can’t tell if you’re being facetious. Text is rendered to a canvas frame buffer and then the solution to text selection involves OCR?

Re: Google Docs will now use canvas based rendering

#408
post #385

Earlier quoted context omitted.

If a developer wants to “remove all user choice” on the web it’s already very easy for them to do that. The only new concern here is that developers will be tempted to use tools/frameworks for unrelated reasons (maybe convenience, cross-platform support, etc.) and those tools/frameworks will just happen to also remove user choice.

Many developers work on removing the user's choice (not) to see ads. But the pesky open nature of the web gets in the way.

I don’t think the open nature of the web gets in the way. Those developers could quite easily generate a screenshot of the website they’re building and ship the screenshot instead of the HTML/CSS/JS.

Re: Google Docs will now use canvas based rendering

#409
post #187

Earlier quoted context omitted.

VS Code already shows why Google would do this. They moved the Terminal from DOM nodes to canvas and got somewhere like a 20x render improvement (after already having spent a lot of time optimizing the DOM implementation). The previous jank all but went away too. EDIT: added their blog article https://code.visualstudio.com/blogs/2017/10/03/terminal-rend...

So the previous jank did not go away?

: very nearly : almost

https://www.merriam-webster.com/dictionary/all%20but

Post reply on HN