Quote:
Originally Posted by Tex2002ans
Just tested that specific code too...
The spacing looks okay in Sigil, but in ADE the gap still stretches when I make the window bigger/smaller.
|
The spacing will look ok in all render engine based on Webkit. So, in Sigil, Calibre, Kobo, etc., the aproximation will work perfectly.
Quote:
And it still line-breaks (Sigil/ADE/PocketBook).
|
The solution is not intended to be applied in a middle of a sentence, just at the beggining.
Quote:
In ADE/PocketBook, the white-space: pre; also causes this:
Code:
This is an example of text — <--- 2 spaces to right-edge
Lorem ipsum [...] <--- 2 spaces along left-edge too, so line looks "indented"
... so I'm assuming other font-/screen-sizes... things are also going to explode.
|
First at all, PocketBook employs two render engines: RMSDK and WebKit. So, if you use WebKit, no problem should be in PocketBook. Besides, this is not a replace for a bullet in an unordered list; just is to denote a dialog.
Finally, THE SOLUTION FOR RMSDK is the following:
Code:
<p>—<span class="ps"> </span>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<p>—<span class="ps"> </span>Nulla ac tellus nunc. Phasellus imperdiet leo metus, et gravida lacus.</p>
<p>—<span class="ps"> </span>Donec metus ligula, elementum at pellentesque pellentesque, suscipit ac nunc. Etiam lobortis, massa ac aliquam auctor, augue nisl sagittis urna, at dapibus tellus erat ullamcorper ligula.</p>
with
Code:
p {
text-align: justify;
}
.ps {
white-space: pre;
}
That code works in my testing under ADE, Sigil, Calibre, Azardi and Kindle Previewer 2.92. So, with RMSDK and WebKit works! The issue seems to be with Kindle Previewer 3.35; with some fonts the alignment is not produced. Amazon must be using a different render engine with .KFX (because with .kf8 all is ok). Under .KFX, when Amazon is justifying the text, in some way is adding a space between "—" and "<span class="ps"> </span>". And still I couldn't find a fix for that case. Also your aproximation has issues with Kindle Previewer 3.35.