As an old school print designer, I would love to see a return to a web with multi-column text on desktop, that reformatted to single column on mobile, and graphics runarounds much more complicated in shape than what a float can do. The art of typographic layout has been lost on the web, because those things are hard. An OS general-purpose engine that could handle layouts like that in any screen size, on Canvas or using absolute positioned divs or generating PDFs, would go a long way toward restoring artistic originality in the "layouting" of online publications.
this has been possible for quite some time with CSS columns:
https://developer.mozilla.org/en-US/docs/Web/CSS/columns
plus media queries for desktop vs mobile layouts:
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_q...
I see it has "length" and "min/max-content" properties... even if there are sufficiently many <p>aragraphs (for vertical splitting), inevitably enough paragraphs will be single column due short length. So it becomes a mix and match between "here we were able to split into columns, and here you get a full width single column text flow"?
PS: Oh and don't get me on the CSS used to determine mobile layouts. My 9:16 4K often enough triggers that degraded experience of mobile.
if the author decided on exactly 2 columns then, well, that's not a limitation of the tech. css columns support dynamic columns, but obviously the author would then need to specify a max height.
> My 9:16 4K often enough triggers that degraded experience of mobile.
again, sounds like incompetent authorship rather than a tech limitation.
i looked for the fastest thing i could find but canvas-hypertxt wasnt accurate enough and allocated an array of split lines per item, which is really wasteful when all you need is a line count. i forked it with some optimizations which improved perf by 60% but still suffered from the accuracy issues. so then decided to DIY my own strategy, and uWrap is the result.
I don’t totally understand the point of this. Why would you want to use a Canvas renderer for this use case? If you want to render a massive table, apps will render a subset of it on regular HTML elements like EveryUUID [1].
uWrap exists to efficiently predict varying row heights for list and grid virtualization[1], a technique for UI performance optimization when rendering large, scrollable datasets.
https://github.com/ironcalc/IronCalc/blob/main/webapp/IronCa...
Thanks!
To be clear, the use case of this is anything where I have lots of text on a canvas? Like, a canvas based game with thought bubbles or something like that?
my use case is determining the height of a table cell given a specific column width and text that needs to be rendered inside.