Unicode needs two new pairs of characters. call them
⟧ for this description, but their actual glyphs could be anything symmetric.
The string "⟪foobar⟫" would be defined to be semantically equivalent to the italic version of "foobar", i.e. "𝑓𝑜𝑜𝑏𝑎𝑟".
Similarly, the string "⟦foobar⟧" would be defined to be semantically equivalent to the bold version of "foobar", i.e. "𝗳𝗼𝗼𝗯𝗮𝗿".
…A text shaper (e.g. Harfbuzz) could replace text between these symbols with italic or bold text, if possible.
But when those italic or bold fonts are unavailable or you are in plain-text mode (e.g. editing a computer program), then the new glyphs would be shown.
(Discuss on Mastodon.)