View Single Post
Old 07-02-2025, 08:36 PM   #1
ElMiko
Evangelist
ElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileRead
 
ElMiko's Avatar
 
Posts: 471
Karma: 65460
Join Date: Jun 2011
Device: Kindle
Question: How to display overwritten/overlapping text

I would like to simulate the effect of overwritten text, as one might seen on a typewriter where two (or more) characters have been struck over the other(s). Do existing epub2 and epub3 e-reader allow for this effect?

my current idea is to use "letter-spacing" like this:

Code:
.ow {
	letter-spacing: -0.65em;
 	margin: 0 0.25em;
	}
.ow2 {
	margin: 0 0.25em;
	}
Code:
<p>I have <span class="ow">tx</span><span class="ow">ox</span><span class="ow2"> </span>go.</p>
which produces text that reads "I have to go" with the "to" overlapped by "xx" in Preview and PageEdit. Obviously, the spacing is going to be sensitive to different font-families and kerning within the font-family itself (if it isn't monospace), but would this even render as desired in actual e-reading software/hardware in theory?

Alternately, is there a better CSS solution?
ElMiko is offline   Reply With Quote