Comment by TacticalCoder

12 hours ago

> The problem it solves is efficiently calculating the height of some wrapped text on a web page, without actually rendering that text to the page first (very expensive).

But in the end, in a browser, the actual text rendering is still done by the browser?

It's a library that allows to "do stuff" before the browser renders the actual text, but by still having the browser render, eventually, the actual text?

Or is this thing actually doing the final rendering of the text too?

Yes the browser still renders the text at the end - but you can now do fancy calculations in advance to decide where you're going to ask the browser to draw it.

  • I suspect exposing the browser's text layout measurer is going to become a Web API in the future, much like exposing the HTML parser via setHTML().