#putting two characters at the same place.

16 messages · Page 1 of 1 (latest)

young bridge
#

Is it possible to stack two characters at the same place?

#

?render

I would like to archive something like this:
#{ show "ّ": t => text(red)[#t];
   [ يّ ]
}

ي + #text(red)[يّ] = 
icy narwhal
#

?render ```ts
#let overlay(base, ..layers) = box(
base + layers.pos().map(place.with(start+top)).join()
)

#overlay(text(red)[يّ], [ي])

icy narwhal
#

you will probably get a bit of the red base bleeding through the edges though

wind vale
#

What does place.with(start+top)? and where does it get it from?

#

I mean start + top

icy narwhal
# wind vale I mean start + top

if you don't put that there, the content will be placed after the base, but it should be aligned with the start and top of the surrounding box

wind vale
#

so pos of layers is mutable and will be changed with the map call? I don't know the underlying model sry.

#

I assumed the content? has a position attribute that gets changed.

icy narwhal
#

map will create new content out of this, it is equivalent to

layers.pos().map(layer => place(start+top, layer))
#

and .pos() is just to get the positional-only arguments of ..layers

wind vale
#

What is the meaning of ..somevar anyways? I have seen it a couple of times now when accesing? a variable.

#

or creating an iterator.

icy narwhal