Skip to content

[css-layout-api] String based inline layout API #990

Open
@atanassov

Description

@atanassov

There've been growing number of use cases requiring the ability to perform inline layout on strings that aren't necessary part of any DOM fragment. Consider any application with a complex model using the UA as a render surface through canvas 2d. Current capabilities of canvas a limiting users to fill/strokeText which is quite primitive compared to current richness of html/css - white space handling, font fallback, bidi re-ordering, justification etc. etc.... as well as the ability to have good braking logic and support for hyphenation etc.

So, wouldn't it be great to expose the capabilities of layout (inline in particular) to such context? It seems like the current custom layout APIs are plenty capable of handling inline layout given a constraint space while letting the author decide where the completed fragments go. Can we do the same for string input?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions