Back in the older ZX Spectrum days, there was a way to print one glyph on top of another, creating a composite glyph with the help of OVER 1
instruction.
I wonder if there is a Unicode way to do the same on modern computers? Can I overlay two completely arbitrary printable glyphs (e.g. 7
and ~
) on top of each other as if they were OR'ed or XOR'ed to produce this result?
Or, alternatively, are there any "negative width" Unicode symbols?
There isn't a way to encode a superposition of two arbitrary characters in Unicode.
In some encodings predating even 8-bit computers, you could overstrike arbitrary characters by transmitting backspace, so è would be e backspace
`. This did not work on early computer screens, but did on mechanical line printers!
There are combining characters in Unicode, including 7̴ and 7̃. Just not that particular one.
The closest thing to support for combining arbitrary characters into a single grapheme is the Zero-Width Joiner (zwidge), which for example is used to make 👩 (woman) + ZWJ
+ ⚕ (caduceus) = 👩⚕️ (female health worker). In emoji and many scripts, such as Devanagari and Arabic, this means something other than superimposing the symbols.
OpenType fonts support ligatures, so a given font might define 7~ or 7 ZWJ
~ as that symbol. Palatino Linotype is one that supports interrobang (‽) this way.
Generally, though, you would need to communicate this to your application some other way, such as embedding a custom font or transmitting the glyph as an inline vector graphic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With