Quote:
Originally Posted by KevinH
One last question ... what about calibre? Does it support rtl text in epub2 and if so is it done via CSS?
|
Based on my limited tests, both Calibre E-book viewer and Calibre editor support epub2 books in which RTL text was marked via css or dir attributes. I don't know whether
@kovidgoyal used any special css for this, because, AFAIK, Webkit natively supports RTL text with the exception of final sentence punctuation characters.
You can test this with this sample sentence:
a) without dir and lang attributes:
Code:
<p>أنا قادر على أكل الزجاج وهذا لا يؤلمني.</p>
b) with dir and lang attributes.
Code:
<p xml:lang="ar" dir="rtl">أنا قادر على أكل الزجاج وهذا لا يؤلمني.</p>
If you copy both paragraphs into an empty epub and look at them in the Preview/Book View window, both sentences will look pretty much identical, because all characters are automatically correctly shaped and all words are displayed in the correct order. However, if you look real close you'll see that in the first example the final period is displayed on the right side (as in LTR text) and in the second example it's displayed on the left side (as it should be).