You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's often the case that UIs want to intersperse non-textual content in line with text. Examples of this would include inline images and form fields. But in theory this extends to arbitrary content. It seems to me that:
A UI framework wanting to implement such functionality would not be able to build it on top of the text-only functionality that cosmic-text currently offers.
It would be relatively easy for cosmic-text to offer support for laying out boxes (rectangles) in line with text.
I don't really care what the API looks like, but I would suggest something like:
Cosmic text takes a Vec<InlineBox> as input in addition to it's existing inputs
Each InlineBox consists of:
a unique identifier
a width
a height
an index into the text string specifying the position at which the box should be laid out
Possibly some kind of baseline/alignment specifying for vertical alignment
Cosmic text output a Vec of box positions for each line consisting of:
the unique identifier
an x position
a y position
The text was updated successfully, but these errors were encountered:
nicoburns
changed the title
Request: The ability to layout arbitrary boxes inline with text
Request: The ability to layout arbitrary boxes in line with text
Feb 23, 2023
It's often the case that UIs want to intersperse non-textual content in line with text. Examples of this would include inline images and form fields. But in theory this extends to arbitrary content. It seems to me that:
I don't really care what the API looks like, but I would suggest something like:
Vec<InlineBox>
as input in addition to it's existing inputsInlineBox
consists of:width
height
x
positiony
positionThe text was updated successfully, but these errors were encountered: