Live data from Hacker News

Google Docs will now use canvas based rendering

workspaceupdates.googleblog.com

381–390 of 953 posts

Re: Google Docs will now use canvas based rendering

#381
On multiple levels it seems nuts to use canvas for a stylized text editor.

There are layout consistency issues across browser and OS. The place I’ve seen this is page breaks changing between computers (or even zoom levels). Line length isn’t controlled solely by the browser, IIRC both kerning (letter spacing) and word spacing is determined by the OS.

I implemented something like Docs myself, but with the goal of total consistency of line/page breaks. Knowing about these issues I used SVG. In SVG text you can override line length, but you still need to have a value in mind, a reference to be calculated independent of user environment details.

Regarding performance, one issue I can speak to is the cascading changes to line breaks. This can be pretty brutal when making a change to the beginning of a long document. To get acceptable performance I had to partially remove the application framework I had been using.

I liked my solution and it worked quite well in prototypes, but I don’t know how it would have faired in the wild.

Re: Google Docs will now use canvas based rendering

#383
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…

I am in complete agreement. When I've brought this up on HN in the past it's always been dismissed with "But accessibility!". A big company like Google can handle that just fine. Presumably they'll eventually port Chrome to WASM. Then they can completely control the browsing experience. To exert any control over our browsing experience we'll be single-stepping thru machine code. I had fun cracking Apple II and PC sof…

> "But accessibility!". A big company like Google can handle that just fine.

Given the problems Material Design has had, I wouldn’t make that assumption. And that’s a front-of-the-front-end part of the org.

Re: Google Docs will now use canvas based rendering

#384
post #369

Earlier quoted context omitted.

I don't think that's true. Flutter is having a shitload of momentum right now. Just recently Canonical embraced Flutter as a first class option for building Wayland apps. Flutter is running on Google hardware such as smart speakers. Of course you also have the ever-looming Fuchsia OS that will have Flutter as the premier toolkit for apps. Etc. etc.

Like Ubuntu Touch?

Desktop. Don't know about Touch, but one would assume it carries over at some point.

Re: Google Docs will now use canvas based rendering

#385
post #278

Earlier quoted context omitted.

You say this like it wont be used to completely remove all user choice and be an utter disaster.

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.

Re: Google Docs will now use canvas based rendering

#386

Earlier quoted context omitted.

Maybe they could bypass it in Chrome, but it wouldn't make it impossible to use for anyone smart enough to set up a pihole.

The WASM code will eventually implement its own DNS analog (or use DoH with a pinned certificate). It'll all be completely opaque TLS to your Pi Hole. Your Pi Hole is the same thing, functionally, as the tools a nation state hostile to human rights uses to filter the Internet. You'll get the same treatment that they do.

That’s when you install squid and have it do the terminating TLS. They won’t pin the certs, too many corps do this already and not to mention certificate lifetime is in the realm of leaving a browser open for weeks.

Re: Google Docs will now use canvas based rendering

#387
post #324

Earlier quoted context omitted.

HTML and CSS are fantastic; when used what they were designed for. Document markup and display. I blame webapp developers for the scope creep and subsequent denigration of a perfectly reasonable set of standards.

HTML and css are great for making application GUIs. I used a bunch of frameworks like qt and Java and wpf and they were all worse than php, css and HTML.

I would argue that Tk is even better for making GUIs.

Here is a simple Tcl/Tk application: https://rkeene.org/viewer/projects/tkweb/test1.tk.htm

And here's what that application looks like (in a web browser, as well as natively, bear in mind that this from 2003): https://rkeene.org/viewer/projects/tkweb/tkweb-test1-2.png.h...

Can you describe the resulting layout as well as interactions as well in HTML ?

Re: Google Docs will now use canvas based rendering

#388
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…

Agree on all points but

> Font rendering and layout can all easily be accomplished by embedding libraries like freetype.

Whoooah no. This stuff is way, way, way harder than dropping in freetype.

Re: Google Docs will now use canvas based rendering

#389
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.…

I had this instinct as well but I think this is about rendering, not necessarily editing. The document link is not to something editable. Granted, perhaps these will merge.

Re: Google Docs will now use canvas based rendering

#390

Earlier quoted context omitted.

I also prefer desktop-first, cloud-backed solutions, but I have quite the opposite experience. Working with MS Office has been a pain and I've been a happy Google Docs user for about 10 years. My wife who isn't an especially technical person also finds Google Docs quite a lot more intuitive and laments when she has to use MS Office products for work (she is a consultant for Microsoft including their 365 line of busin…

What makes Google Docs a better product than MS Office? Can you provide some examples of features that are better in Google Docs?

Copy a few cells from a Google sheet and paste it in an email, then do the same with Excel. Collaborate on building out a document from scratch with 10 people in Google sheets vs Excel.

Excel is a monster, and much more powerful than Google sheets in many ways, but in my experience, Google docs apps are a little better for collaboration, and they integrate a little tighter with each other.

Post reply on HN